summaryrefslogtreecommitdiff
path: root/src/_pytest/nose.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/_pytest/nose.py')
-rw-r--r--src/_pytest/nose.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/_pytest/nose.py b/src/_pytest/nose.py
index de91af85a..5bba030a5 100644
--- a/src/_pytest/nose.py
+++ b/src/_pytest/nose.py
@@ -13,7 +13,7 @@ def pytest_runtest_setup(item) -> None:
# Call module level setup if there is no object level one.
call_optional(item.parent.obj, "setup")
# XXX This implies we only call teardown when setup worked.
- item.session._setupstate.addfinalizer((lambda: teardown_nose(item)), item)
+ item.addfinalizer(lambda: teardown_nose(item))
def teardown_nose(item) -> None: