Sphinx Doctest: test the code without comparing the output.
Luca Cerone
luca.cerone at gmail.com
Sun Sep 22 00:15:48 EDT 2013
>
> That is not how doctest works. That test fails because its output is:
ok.. is there a tool by which I can test if my code runs regardless the output?
>
> The only wild-card output that doctest recognises is ellipsis, and like
>
> all wild-cards, can match too much if you aren't careful. If ellipsis is
>
actually I want to match the whole output.. and you can't because ellipsis is the same as line continuation...
>
>
>
> will work. But a better solution, I think, would be to pick a
I think you are sticking too much to the examples I posted, where I used functions that are part of Python, so that everybody could run the code and test the issues.
I don't use random numbers, so I can't apply what you said.
Really, I am looking for a way to test the code while ignoring the output.
I don't know if usually it is a bad choice, but in my case is what I want/need.
Thanks for the help,
Luca
More information about the Python-list
mailing list