Removed unnecessary iteration in nose.pytest_runtest_makereport.
This commit is contained in:
parent
77e1f93ca1
commit
85e7b11ef5
|
@ -17,16 +17,11 @@ def get_skip_exceptions():
|
||||||
|
|
||||||
|
|
||||||
def pytest_runtest_makereport(__multicall__, item, call):
|
def pytest_runtest_makereport(__multicall__, item, call):
|
||||||
if not call.excinfo:
|
if call.excinfo and call.excinfo.errisinstance(get_skip_exceptions()):
|
||||||
return
|
# let's substitute the excinfo with a pytest.skip one
|
||||||
|
call2 = call.__class__(lambda:
|
||||||
for skip_exc in get_skip_exceptions():
|
pytest.skip(str(call.excinfo.value)), call.when)
|
||||||
if call.excinfo.errisinstance(skip_exc):
|
call.excinfo = call2.excinfo
|
||||||
# let's substitute the excinfo with a pytest.skip one
|
|
||||||
call2 = call.__class__(lambda:
|
|
||||||
pytest.skip(str(call.excinfo.value)), call.when)
|
|
||||||
call.excinfo = call2.excinfo
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.trylast
|
@pytest.mark.trylast
|
||||||
|
|
Loading…
Reference in New Issue