summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-12-18 23:03:42 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2012-12-18 23:03:42 +0100
commite0b1c23145f6529d39cfa5424403c77f21d0839f (patch)
treef8e40eb8e0a7aeac6062c8cd5da5599776386f23 /Lib
parent202b60640bd873f00ee121cb24ee4a6409eb8993 (diff)
downloadcpython-git-e0b1c23145f6529d39cfa5424403c77f21d0839f.tar.gz
Try to make test_threaded_import faster and safer (issue #15599).
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_threaded_import.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_threaded_import.py b/Lib/test/test_threaded_import.py
index 93bfb2a758..e0c23dec66 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.")