This commit is contained in:
Siu Kwan Lam 2013-12-18 12:49:24 -06:00
commit f8c1c78df1
5 changed files with 70 additions and 13 deletions

View file

@ -37,7 +37,17 @@ def run(verbosity=1):
if sys.version_info[:2] > (2, 6):
kwargs['buffer'] = True
runner = unittest.TextTestRunner(**kwargs)
testresult = runner.run(suite)
try:
from guppy import hpy
except ImportError:
testresult = runner.run(suite)
else:
hp = hpy()
hp.setref()
testresult = runner.run(suite)
print(hp.heap())
if testresult:
# Run isolated tests