diff options
author | schlamar <marc.schlaich@gmail.com> | 2014-03-14 15:29:42 +0100 |
---|---|---|
committer | schlamar <marc.schlaich@gmail.com> | 2014-03-14 15:29:42 +0100 |
commit | 85e7b11ef56c25549767114313c13efc4f0ee86b (patch) | |
tree | 74376e04b5e609036b387fa5cf0209ec50f1b460 /_pytest/nose.py | |
parent | 77e1f93ca11c7bc886ba4956187b24b7380e655c (diff) | |
download | pytest-85e7b11ef56c25549767114313c13efc4f0ee86b.tar.gz |
Removed unnecessary iteration in nose.pytest_runtest_makereport.
Diffstat (limited to '_pytest/nose.py')
-rw-r--r-- | _pytest/nose.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/_pytest/nose.py b/_pytest/nose.py index 3b060f8bc..203db9850 100644 --- a/_pytest/nose.py +++ b/_pytest/nose.py @@ -17,16 +17,11 @@ def get_skip_exceptions(): def pytest_runtest_makereport(__multicall__, item, call): - if not call.excinfo: - return - - for skip_exc in get_skip_exceptions(): - if call.excinfo.errisinstance(skip_exc): - # 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 + if call.excinfo and call.excinfo.errisinstance(get_skip_exceptions()): + # 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 @pytest.mark.trylast |