Commit af8e4e38 authored by Sidnei da Silva's avatar Sidnei da Silva

parent 8e8ecbde
...@@ -609,6 +609,8 @@ class TrackRefs: ...@@ -609,6 +609,8 @@ class TrackRefs:
def runner(files, test_filter, debug): def runner(files, test_filter, debug):
runner = ImmediateTestRunner(verbosity=VERBOSE, debug=debug, runner = ImmediateTestRunner(verbosity=VERBOSE, debug=debug,
progress=progress) progress=progress)
result = runner.result
suite = unittest.TestSuite() suite = unittest.TestSuite()
for file in files: for file in files:
s = get_suite(file, runner.result) s = get_suite(file, runner.result)
...@@ -625,6 +627,8 @@ def runner(files, test_filter, debug): ...@@ -625,6 +627,8 @@ def runner(files, test_filter, debug):
print "Wrote timing data to", timesfn print "Wrote timing data to", timesfn
if timetests: if timetests:
r.print_times(sys.stdout, timetests) r.print_times(sys.stdout, timetests)
numbad = len(result.failures) + len(result.errors)
return numbad
except: except:
if debugger: if debugger:
pdb.post_mortem(sys.exc_info()[2]) pdb.post_mortem(sys.exc_info()[2])
...@@ -706,7 +710,7 @@ def main(module_filter, test_filter, libdir): ...@@ -706,7 +710,7 @@ def main(module_filter, test_filter, libdir):
rc = sys.gettotalrefcount() rc = sys.gettotalrefcount()
track = TrackRefs() track = TrackRefs()
while True: while True:
runner(files, test_filter, debug) numbad = runner(files, test_filter, debug)
gc.collect() gc.collect()
if gc.garbage: if gc.garbage:
print "GARBAGE:", len(gc.garbage), gc.garbage print "GARBAGE:", len(gc.garbage), gc.garbage
...@@ -717,8 +721,9 @@ def main(module_filter, test_filter, libdir): ...@@ -717,8 +721,9 @@ def main(module_filter, test_filter, libdir):
print "totalrefcount=%-8d change=%-6d" % (rc, rc - prev) print "totalrefcount=%-8d change=%-6d" % (rc, rc - prev)
track.update() track.update()
else: else:
runner(files, test_filter, debug) numbad = runner(files, test_filter, debug)
return numbad
def configure_logging(): def configure_logging():
"""Initialize the logging module.""" """Initialize the logging module."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment