ref #322 cleanup all teardown calling to only happen when setup succeeded.

don't use autouse fixtures for now because it would cause a proliferation
and overhead for the execution of every test.  Rather introduce a
node.addfinalizer(fin) to attach a finalizer to the respective node
and call it from node.setup() functions if the setup phase succeeded
(i.e. there is no setup function or it finished successfully)
This commit is contained in:
holger krekel
2013-08-02 09:52:40 +02:00
parent b2ebb80878
commit 7d86827b5e
10 changed files with 151 additions and 89 deletions

View File

@@ -834,8 +834,6 @@ class TestFixtureUsages:
l = reprec.getfailedcollections()
assert len(l) == 1
@pytest.mark.xfail(reason="unclear if it should be supported at all, "
"currently broken")
def test_request_can_be_overridden(self, testdir):
testdir.makepyfile("""
import pytest