manually build a unittest/doctest object.
Laura Creighton
lac at openend.se
Tue Dec 8 09:30:39 EST 2015
In a message of Tue, 08 Dec 2015 07:04:39 -0700, Vincent Davis writes:
>On Tue, Dec 8, 2015 at 2:06 AM, Peter Otten <__peter__ at web.de> wrote:
>
>> But why would you want to do that?
>
>
>Thanks Peter, I want to do that because I want to test jupyter notebooks.
>The notebook is in JSON and I can get the source and result out but it was
>unclear to me how to stick this into a test. doctest seemed the simplest
>but maybe there is a better way.
>
>I also tried something like:
>assert exec("""print('hello word')""") == 'hello word'
>
>
>Vincent Davis
>720-301-3003
>--
>https://mail.python.org/mailman/listinfo/python-list
Check out this:
https://pypi.python.org/pypi/pytest-ipynb
Laura
More information about the Python-list
mailing list