diff --git a/_pytest/runner.py b/_pytest/runner.py index 78baae47d..d6f85f0f4 100644 --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -193,7 +193,6 @@ def pytest_runtest_makereport(item, call): outcome = "passed" longrepr = None else: - excinfo = call.excinfo if not isinstance(excinfo, py.code.ExceptionInfo): outcome = "failed" longrepr = excinfo diff --git a/bench/bench.py b/bench/bench.py index 8120f9f67..ce934feb9 100644 --- a/bench/bench.py +++ b/bench/bench.py @@ -3,8 +3,8 @@ if __name__ == '__main__': import cProfile import py import pstats - stats = cProfile.run('py.test.cmdline.main(["empty.py", ])', 'prof') + stats = cProfile.run('py.test.cmdline.main(["skip.py", ])', 'prof') p = pstats.Stats("prof") p.strip_dirs() p.sort_stats('cumulative') - print(p.print_stats(50)) + print(p.print_stats(250)) diff --git a/bench/skip.py b/bench/skip.py new file mode 100644 index 000000000..960b30864 --- /dev/null +++ b/bench/skip.py @@ -0,0 +1,10 @@ + +import pytest + + +SKIP = True + +@pytest.mark.parametrize("x", xrange(5000)) +def test_foo(x): + if SKIP: + pytest.skip("heh")