From 8af6f623e86c2c8411e00d512075076971249c6e Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 16 Jun 2025 19:51:03 -0300 Subject: [PATCH] Remove unused code related to `nose` Support for `nose` has been dropped in 8.0. --- src/_pytest/unittest.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/_pytest/unittest.py b/src/_pytest/unittest.py index 04d50b53090..27807274168 100644 --- a/src/_pytest/unittest.py +++ b/src/_pytest/unittest.py @@ -372,18 +372,6 @@ def pytest_runtest_makereport(item: Item, call: CallInfo[None]) -> None: except AttributeError: pass - # Convert unittest.SkipTest to pytest.skip. - # This is actually only needed for nose, which reuses unittest.SkipTest for - # its own nose.SkipTest. For unittest TestCases, SkipTest is already - # handled internally, and doesn't reach here. - unittest = sys.modules.get("unittest") - if unittest and call.excinfo and isinstance(call.excinfo.value, unittest.SkipTest): - excinfo = call.excinfo - call2 = CallInfo[None].from_call( - lambda: pytest.skip(str(excinfo.value)), call.when - ) - call.excinfo = call2.excinfo - # Twisted trial support. classImplements_has_run = False