Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100159
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: manually build a unittest/doctest object. |
| Date | 2015-12-08 15:30 +0100 |
| Message-ID | <mailman.67.1449585052.12405.python-list@python.org> (permalink) |
| References | <CALyJZZXeRaFxxdDK6aNSZC4xyqn082kZCGtgYBQxnBqKU-_WEg@mail.gmail.com> <n466ip$bg7$1@ger.gmane.org> <CALyJZZVugpQ4FEo2xT9EYQvVrgwJWE503zqO7DwUOg_GGECUnA@mail.gmail.com> |
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__@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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: manually build a unittest/doctest object. Laura Creighton <lac@openend.se> - 2015-12-08 15:30 +0100
csiph-web