xunit-style functions and methods are invoked by autouse fixtures

Fix #3094, Fix #517
This commit is contained in:
Bruno Oliveira
2018-10-06 20:30:18 -03:00
parent 0da5531c7c
commit 0f918b1a9d
6 changed files with 239 additions and 68 deletions

View File

@@ -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