diff options
Diffstat (limited to 'Lib/test/test_bz2.py')
-rw-r--r-- | Lib/test/test_bz2.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py index 1535e8e6695..beef2759300 100644 --- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@ -493,10 +493,8 @@ class BZ2FileTest(BaseTest): for i in range(5): f.write(data) threads = [threading.Thread(target=comp) for i in range(nthreads)] - for t in threads: - t.start() - for t in threads: - t.join() + with support.start_threads(threads): + pass def testWithoutThreading(self): module = support.import_fresh_module("bz2", blocked=("threading",)) |