There was an error while loading. Please reload this page.
1 parent 4384239 commit 3efdf4fCopy full SHA for 3efdf4f
1 file changed
Lib/test/test_free_threading/test_threading.py
@@ -1,4 +1,6 @@
1
import unittest
2
+import threading
3
+import _thread
4
from test.support import threading_helper
5
6
threading_helper.requires_working_threading(module=True)
@@ -7,7 +9,6 @@
7
9
class TestRlock(unittest.TestCase):
8
10
def test_repr_race(self):
11
# gh-153292
- import _thread
12
r = _thread.RLock()
13
14
def repr_thread():
@@ -24,9 +25,6 @@ def mutate_thread():
24
25
26
class TestShutdown(unittest.TestCase):
27
def test_shutdown_race(self):
28
- import threading
29
-
30
ITERATIONS = 1_000
31
STARTUP_THREADS = 4
32
@@ -61,5 +59,6 @@ def startup_worker():
61
59
if cm.exc_value is not None:
62
60
raise cm.exc_value
63
+
64
if __name__ == "__main__":
65
unittest.main()
0 commit comments