Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54570
| References | <6fbfa8a5-92ab-4821-92ea-7eb4efbe199d@googlegroups.com> <523d90b2$0$29988$c3e8da3$5496439d@news.astraweb.com> <9de3b59f-6cd1-4357-a59e-b2ee028d59ab@googlegroups.com> <523dbfd2$0$29988$c3e8da3$5496439d@news.astraweb.com> <0a3a0078-2d55-4cc8-bf8d-f7bede6af9f1@googlegroups.com> |
|---|---|
| Date | 2013-09-22 11:33 +1000 |
| Subject | Re: Sphinx Doctest: test the code without comparing the output. |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.237.1379813607.18130.python-list@python.org> (permalink) |
On Sun, Sep 22, 2013 at 2:25 AM, Luca Cerone <luca.cerone@gmail.com> wrote: > The difference is that in that case you want to check whether the result is correct or not, because you expect a certain result. > > In my case, I don't know what the output is, nor care for the purpose of the tutorial. What I care is being sure that the command in the tutorial is correct, and up to date with the code. I'd call that a smoke-test, rather than something a test harness/engine should be doing normally. All you do is see if the program crashes. This can be extremely useful (I smoke-test my scripts as part of my one-key "deploy to testbox" script, saving me the trouble of actually running anything - simple syntactic errors or misspelled function/variable names (in languages where that's a concept) get caught really early); but if you're using this for a tutorial, you risk creating a breed of novice programmers who believe their first priority is to stop the program crashing. Smoke testing is a tool that should be used by the expert, NOT a sole check given to a novice. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Sphinx Doctest: test the code without comparing the output. Luca Cerone <luca.cerone@gmail.com> - 2013-09-21 03:47 -0700
Re: Sphinx Doctest: test the code without comparing the output. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-21 12:27 +0000
Re: Sphinx Doctest: test the code without comparing the output. Luca Cerone <luca.cerone@gmail.com> - 2013-09-21 05:44 -0700
Re: Sphinx Doctest: test the code without comparing the output. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-21 15:48 +0000
Re: Sphinx Doctest: test the code without comparing the output. Luca Cerone <luca.cerone@gmail.com> - 2013-09-21 09:25 -0700
Re: Sphinx Doctest: test the code without comparing the output. Chris Angelico <rosuav@gmail.com> - 2013-09-22 11:33 +1000
Re: Sphinx Doctest: test the code without comparing the output. Luca Cerone <luca.cerone@gmail.com> - 2013-09-21 21:09 -0700
Re: Sphinx Doctest: test the code without comparing the output. Chris Angelico <rosuav@gmail.com> - 2013-09-22 14:25 +1000
Re: Sphinx Doctest: test the code without comparing the output. Ned Batchelder <ned@nedbatchelder.com> - 2013-09-22 09:39 -0400
Re: Sphinx Doctest: test the code without comparing the output. Luca Cerone <luca.cerone@gmail.com> - 2013-09-22 07:26 -0700
Re: Sphinx Doctest: test the code without comparing the output. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-23 00:36 +0000
Re: Sphinx Doctest: test the code without comparing the output. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-22 02:38 +0000
Re: Sphinx Doctest: test the code without comparing the output. Luca Cerone <luca.cerone@gmail.com> - 2013-09-21 21:15 -0700
Re: Sphinx Doctest: test the code without comparing the output. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-22 12:12 +0000
Re: Sphinx Doctest: test the code without comparing the output. Luca Cerone <luca.cerone@gmail.com> - 2013-09-22 07:24 -0700
Re: Sphinx Doctest: test the code without comparing the output. Neil Cerutti <neilc@norwich.edu> - 2013-09-23 13:42 +0000
Re: Sphinx Doctest: test the code without comparing the output. Luca Cerone <luca.cerone@gmail.com> - 2013-09-23 07:45 -0700
Re: Sphinx Doctest: test the code without comparing the output. Luca Cerone <luca.cerone@gmail.com> - 2013-09-23 07:51 -0700
Re: Sphinx Doctest: test the code without comparing the output. Skip Montanaro <skip@pobox.com> - 2013-09-23 10:14 -0500
Re: Sphinx Doctest: test the code without comparing the output. Neil Cerutti <neilc@norwich.edu> - 2013-09-23 16:44 +0000
Re: Sphinx Doctest: test the code without comparing the output. Neil Cerutti <neilc@norwich.edu> - 2013-09-23 16:53 +0000
Re: Sphinx Doctest: test the code without comparing the output. Luca Cerone <luca.cerone@gmail.com> - 2013-09-23 11:54 -0700
csiph-web