[py-dev] py.test and asserts in method_teardown

Johan Björk jbjoerk at gmail.com
Wed Aug 8 00:48:05 CEST 2007


First post on the list, please excuse me if I don't follow normal
guidelines for posting here...

I'm having an assert in my method_teardown, which gives rather
confusing results.

See attached short example (ugly)
Running py.test on this testclass, you will get an output similar to:

entrypoint: TestMyClass().testApa3 _________________________________________

    def teardown_method(self,method):
E                   assert 0
>                   assert 0


I would have expected to get "testApa2" as the entrypoint.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_class.py
Type: application/octet-stream
Size: 319 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20070807/66980a02/attachment.obj>

More information about the Pytest-dev mailing list