[TIP] getting the result of a test in teardown_method?
hnsbstn at gmail.com
Sat May 8 22:52:02 PDT 2010
I hope this is where people do Q&A on py.test. Otherwise please direct me to
the right place.
I've been using py.test to write test scripts. The tests I write use the
unittest pattern and failure is detected by raising AssertionError. My
question is how can I get the result of a test immediately in my
teardown_method(self, method) or in the pytest_runtest_teardown(item) hook?
The reason I want to know the result at those points is that I want to have
different teardown logics based on the test result.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python