[pytest-dev] Running finalizer in case test setup has failed

Andrii Smirnov slip76 at gmail.com
Mon Nov 11 18:56:25 CET 2013


Hello All,

We have complex enough (several stages of putting the test environment into
some condition) code which should be executed in all cases regardless of
test setup result (fixture setup).

Since finalizer for fixture will not be called in case its (fixture) setup
failed we've put some calls to pytest_sessionfinish as a temporary
workaround but we need to find a way how to call finalizer code explicitly.

Could you please suggest how to achieve that?

Thank you in advance!

-Andrii
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20131111/fd4889b6/attachment.html>


More information about the Pytest-dev mailing list