Skip to content

Commit 285ca54

Browse files
correct hidden CallInfo usage in nose plugin
1 parent cd70d69 commit 285ca54

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/_pytest/nose.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ def get_skip_exceptions():
2323
def pytest_runtest_makereport(item, call):
2424
if call.excinfo and call.excinfo.errisinstance(get_skip_exceptions()):
2525
# let's substitute the excinfo with a pytest.skip one
26-
call2 = call.__class__(lambda: runner.skip(str(call.excinfo.value)), call.when)
26+
call2 = runner.CallInfo.from_call(
27+
lambda: runner.skip(str(call.excinfo.value)), call.when
28+
)
2729
call.excinfo = call2.excinfo
2830

2931

0 commit comments

Comments
 (0)