add a skip benchmark file (from issue400).

This commit is contained in:
holger krekel 2013-12-07 19:11:37 +01:00
parent 426907eafb
commit dbfbc2b222
3 changed files with 12 additions and 3 deletions

View File

@ -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

View File

@ -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))

10
bench/skip.py Normal file
View File

@ -0,0 +1,10 @@
import pytest
SKIP = True
@pytest.mark.parametrize("x", xrange(5000))
def test_foo(x):
if SKIP:
pytest.skip("heh")