Sphinx Doctest: test the code without comparing the output.

Chris Angelico rosuav at gmail.com
Sun Sep 22 00:25:36 EDT 2013


On Sun, Sep 22, 2013 at 2:09 PM, Luca Cerone <luca.cerone at gmail.com> wrote:
>> 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
>
> Hi Chris,
> actually my priority is to check that the code is correct. I changed the syntax
> during the development, and I want to be sure that my tutorial is up to date.
>
> The user will only see the examples that, after testing with doctest, will
> run. They won't know that I used doctests for the documentation..
>
> How can I do what you call smoke tests in my Sphinx documentation?

I don't know Sphinx, so I can't help there. But maybe you should just
have a pile of .py files, and you import each one and see if you get
an exception?

ChrisA



More information about the Python-list mailing list