fix bare "py.test" runs without a directory by not defaulting to --doctest-modules which will virtually import everything

This commit is contained in:
holger krekel 2010-11-18 15:19:20 +01:00
parent 0325441099
commit 5a2295ada5
2 changed files with 10 additions and 9 deletions

View File

@ -1,9 +1,10 @@
import cProfile if __name__ == '__main__':
import py import cProfile
import pstats import py
stats = cProfile.run('py.test.cmdline.main(["empty.py", ])', 'prof') import pstats
p = pstats.Stats("prof") stats = cProfile.run('py.test.cmdline.main(["empty.py", ])', 'prof')
p.strip_dirs() p = pstats.Stats("prof")
p.sort_stats('cumulative') p.strip_dirs()
print p.print_stats(30) p.sort_stats('cumulative')
print p.print_stats(30)

View File

@ -63,6 +63,6 @@ commands=
[pytest] [pytest]
minversion=2.0 minversion=2.0
plugins=pytester plugins=pytester
addopts= -rxf --pyargs --doctest-modules addopts= -rxf --pyargs
rsyncdirs=tox.ini pytest.py _pytest testing rsyncdirs=tox.ini pytest.py _pytest testing