diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-18 22:03:42 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-12-18 22:03:42 (GMT) |
commit | e0b1c23145f6529d39cfa5424403c77f21d0839f (patch) | |
tree | f8e40eb8e0a7aeac6062c8cd5da5599776386f23 | |
parent | 202b60640bd873f00ee121cb24ee4a6409eb8993 (diff) | |
download | cpython-e0b1c23145f6529d39cfa5424403c77f21d0839f.zip cpython-e0b1c23145f6529d39cfa5424403c77f21d0839f.tar.gz cpython-e0b1c23145f6529d39cfa5424403c77f21d0839f.tar.bz2 |
Try to make test_threaded_import faster and safer (issue #15599).
-rw-r--r-- | Lib/test/test_threaded_import.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_threaded_import.py b/Lib/test/test_threaded_import.py index 93bfb2a..e0c23de 100644 --- a/Lib/test/test_threaded_import.py +++ b/Lib/test/test_threaded_import.py @@ -72,7 +72,7 @@ class Finder: with self.lock: self.numcalls += 1 x = self.x - time.sleep(0.1) + time.sleep(0.01) self.x = x + 1 class FlushingFinder: @@ -117,7 +117,7 @@ class ThreadedImportTests(unittest.TestCase): t = threading.Thread(target=task, args=(N, done, done_tasks, errors,)) t.start() - done.wait(60) + self.assertTrue(done.wait(60)) self.assertFalse(errors) if verbose: print("OK.") |