Skip to content

Commit 7538aa7

Browse files
committed
minor: check_interactive_exception: use Skipped
1 parent db34bf0 commit 7538aa7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/_pytest/nose.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import six
99

10+
import pytest
1011
from _pytest import python
1112
from _pytest import runner
1213
from _pytest import unittest
@@ -26,7 +27,7 @@ def pytest_runtest_makereport(item, call):
2627
if call.excinfo and call.excinfo.errisinstance(get_skip_exceptions()):
2728
# let's substitute the excinfo with a pytest.skip one
2829
call2 = runner.CallInfo.from_call(
29-
lambda: runner.skip(six.text_type(call.excinfo.value)), call.when
30+
lambda: pytest.skip(six.text_type(call.excinfo.value)), call.when
3031
)
3132
call.excinfo = call2.excinfo
3233

src/_pytest/runner.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from .reports import TestReport
1717
from _pytest._code.code import ExceptionInfo
1818
from _pytest.outcomes import Exit
19-
from _pytest.outcomes import skip
2019
from _pytest.outcomes import Skipped
2120
from _pytest.outcomes import TEST_OUTCOME
2221

@@ -183,7 +182,7 @@ def call_and_report(item, when, log=True, **kwds):
183182
def check_interactive_exception(call, report):
184183
return call.excinfo and not (
185184
hasattr(report, "wasxfail")
186-
or call.excinfo.errisinstance(skip.Exception)
185+
or call.excinfo.errisinstance(Skipped)
187186
or call.excinfo.errisinstance(bdb.BdbQuit)
188187
)
189188

0 commit comments

Comments
 (0)