diff --git a/bench/bench.py b/bench/bench.py index ce934feb9..6e9d710ba 100644 --- a/bench/bench.py +++ b/bench/bench.py @@ -1,9 +1,11 @@ +import sys if __name__ == '__main__': import cProfile import py import pstats - stats = cProfile.run('py.test.cmdline.main(["skip.py", ])', 'prof') + script = sys.argv[1] if len(sys.argv) > 1 else "empty.py" + stats = cProfile.run('py.test.cmdline.main([%r])' % script, 'prof') p = pstats.Stats("prof") p.strip_dirs() p.sort_stats('cumulative') diff --git a/bench/manyparam.py b/bench/manyparam.py new file mode 100644 index 000000000..d2bca0e8a --- /dev/null +++ b/bench/manyparam.py @@ -0,0 +1,12 @@ + +import pytest + +@pytest.fixture(scope='module', params=range(966)) +def foo(request): + return request.param + +def test_it(foo): + pass +def test_it2(foo): + pass +