[TIP] Docstrings in Test methods

Kumar McMillan kumar.mcmillan at gmail.com
Sat Nov 5 15:50:27 PDT 2011


On Sat, Nov 5, 2011 at 8:07 AM, Alfredo Deza <alfredodeza at gmail.com> wrote:

> But this would be for failing tests you say? This is what I would see
> in Python2.6
> and unittest 1.63
>
> $ python test_foo.py
> F
> ======================================================================
> FAIL: when foo uses bar as a connection it should be True when successful
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "test_foo.py", line 7, in test_foo_should_be_true
>    assert False
> AssertionError
>

I don't use doctests on tests but when I do, I make sure I have this Nose
plugin: https://github.com/kumar303/disable-docstring

I'm pretty sure py.test never had this problem to begin with.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20111105/786cd19f/attachment.html>


More information about the testing-in-python mailing list