Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100156
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Vincent Davis <vincent@vincentdavis.net> |
| Newsgroups | comp.lang.python |
| Subject | Re: manually build a unittest/doctest object. |
| Date | Tue, 8 Dec 2015 07:04:39 -0700 |
| Lines | 17 |
| Message-ID | <mailman.64.1449583507.12405.python-list@python.org> (permalink) |
| References | <CALyJZZXeRaFxxdDK6aNSZC4xyqn082kZCGtgYBQxnBqKU-_WEg@mail.gmail.com> <n466ip$bg7$1@ger.gmane.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | news.uni-berlin.de d4dkhNkHS/A6mulZ/W/W5QqMw8N9jNkuEuYPE6HHcMnA== |
| Return-Path | <vincent@vincentdavis.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'json': 0.05; 'that?': 0.05; 'doctest': 0.07; 'seemed': 0.07; 'subject:build': 0.07; 'cc:addr:python-list': 0.09; 'received:209.85.218': 0.10; "'hello": 0.16; '2:06': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:unittest': 0.16; 'to:addr:web.de': 0.16; 'wrote:': 0.16; 'stick': 0.18; 'test.': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'am,': 0.23; 'dec': 0.23; 'tried': 0.24; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'skip:e 30': 0.27; 'subject:/': 0.30; 'maybe': 0.33; 'source': 0.33; 'tue,': 0.34; 'received:google.com': 0.35; 'something': 0.35; 'but': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'received:209': 0.38; 'why': 0.39; 'test': 0.39; 'skip:e 20': 0.39; 'otten': 0.84; 'peter,': 0.84; 'unclear': 0.84; 'notebook': 0.96 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=vincentdavis.net; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=BR7jPGTl0YBwlOkc11JSmu43tfrYGCRIJH6N3x87lA8=; b=gyscm987gDoYKw1Ab392p7ab2Su10mmPN4aBG5QzGRJce3CWl1+y2RhXez2Od9cwYx q2CnME4BxkfM0oh5OEH8tqJwge2ZPTQDjAI3m3kD3Ub2e7dmIRSSWfjbNr1v6bmN40V/ pWPBlN4mLojmRrh5zOYg0vNW9j1fZDjGCxH0w= |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=BR7jPGTl0YBwlOkc11JSmu43tfrYGCRIJH6N3x87lA8=; b=Ff5v/OkVDbO59ejt0pS+J1GAVRMPmGlgnLHrd2dgnFrfoEsxw8+lMEOOgCJ4R3BaSg gsZx6g51xb5OPEdO333LhFmM98lMSThnzXwCO8i108WCs+OhO7+BMtotrO2skk1E0QrV Pnbx4uulu2cdDjAIQkTvqm3OmY3gLoSXlgzYf5EenDudZxK8yaKiaGnpoqlVbQCDNFXD IMZahLaIFkW83Y4oyITp6NHvAPyG/DurBSrilWwz+A4t2t7ul8B+fMYTELLvh6DkSfG4 ZNqjbcZ/xs79POgmTMJ11HNmPwFCdv2F0drUqt7oZ8UW7JzCczh0m0XUum9k1NtpmRrS XWiQ== |
| X-Gm-Message-State | ALoCoQn0YVCM4UfuBnP21TzmvPirJG84fo/l+yNbtlwSGDff3mZkosf2zpep4k1TQKXIfFqGrmw5jgH5vwiS5IgzfuUg5bdVmbj/Vv9EiI+mhtVzzAOZSE0= |
| X-Received | by 10.202.216.212 with SMTP id p203mr2362748oig.77.1449583499387; Tue, 08 Dec 2015 06:04:59 -0800 (PST) |
| In-Reply-To | <n466ip$bg7$1@ger.gmane.org> |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.20+ |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Xref | csiph.com comp.lang.python:100156 |
Show key headers only | View raw
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: manually build a unittest/doctest object. Vincent Davis <vincent@vincentdavis.net> - 2015-12-08 07:04 -0700
csiph-web