fix bare "py.test" runs without a directory by not defaulting to --doctest-modules which will virtually import everything
This commit is contained in:
parent
0325441099
commit
5a2295ada5
|
@ -1,9 +1,10 @@
|
|||
|
||||
import cProfile
|
||||
import py
|
||||
import pstats
|
||||
stats = cProfile.run('py.test.cmdline.main(["empty.py", ])', 'prof')
|
||||
p = pstats.Stats("prof")
|
||||
p.strip_dirs()
|
||||
p.sort_stats('cumulative')
|
||||
print p.print_stats(30)
|
||||
if __name__ == '__main__':
|
||||
import cProfile
|
||||
import py
|
||||
import pstats
|
||||
stats = cProfile.run('py.test.cmdline.main(["empty.py", ])', 'prof')
|
||||
p = pstats.Stats("prof")
|
||||
p.strip_dirs()
|
||||
p.sort_stats('cumulative')
|
||||
print p.print_stats(30)
|
||||
|
|
Loading…
Reference in New Issue