Issue #22333: Add debug traces to test_threaded_import

This commit is contained in:
Victor Stinner 2014-09-04 09:38:38 +02:00
parent 654c037b65
commit b39b918baa
1 changed files with 4 additions and 2 deletions

View File

@ -118,8 +118,10 @@ class ThreadedImportTests(unittest.TestCase):
t = threading.Thread(target=task,
args=(N, done, done_tasks, errors,))
t.start()
self.assertTrue(done.wait(60))
self.assertFalse(errors)
completed = done.wait(60)
dbg_info = 'done: %s/%s' % (len(done_tasks), N)
self.assertFalse(errors, dbg_info)
self.assertTrue(completed, dbg_info)
if verbose:
print("OK.")