diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2018-10-06 20:30:18 -0300 |
---|---|---|
committer | Bruno Oliveira <nicoddemus@gmail.com> | 2019-01-10 12:10:04 -0200 |
commit | 0f918b1a9dd14a2d046d19be6ec239e8e2df4cb2 (patch) | |
tree | 4bea7d16e1cee29c0eb6ac0ce5ddffa48f5985e5 /doc/en/xunit_setup.rst | |
parent | 0da5531c7c3c40386d7b268ab070ffd0f97bd52c (diff) | |
download | pytest-0f918b1a9dd14a2d046d19be6ec239e8e2df4cb2.tar.gz |
xunit-style functions and methods are invoked by autouse fixtures
Fix #3094, Fix #517
Diffstat (limited to 'doc/en/xunit_setup.rst')
-rw-r--r-- | doc/en/xunit_setup.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/en/xunit_setup.rst b/doc/en/xunit_setup.rst index 7a6c099f5..466873302 100644 --- a/doc/en/xunit_setup.rst +++ b/doc/en/xunit_setup.rst @@ -93,7 +93,15 @@ Remarks: * It is possible for setup/teardown pairs to be invoked multiple times per testing process. + * teardown functions are not called if the corresponding setup function existed and failed/was skipped. +* Prior to pytest-4.2, xunit-style functions did not obey the scope rules of fixtures, so + it was possible, for example, for a ``setup_method`` to be called before a + session-scoped autouse fixture. + + Now the xunit-style functions are integrated with the fixture mechanism and obey the proper + scope rules of fixtures involved in the call. + .. _`unittest.py module`: http://docs.python.org/library/unittest.html |