Skip to content

Commit 3efdf4f

Browse files
committed
fix the import and newline for comment
1 parent 4384239 commit 3efdf4f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Lib/test/test_free_threading/test_threading.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import unittest
2+
import threading
3+
import _thread
24
from test.support import threading_helper
35

46
threading_helper.requires_working_threading(module=True)
@@ -7,7 +9,6 @@
79
class TestRlock(unittest.TestCase):
810
def test_repr_race(self):
911
# gh-153292
10-
import _thread
1112
r = _thread.RLock()
1213

1314
def repr_thread():
@@ -24,9 +25,6 @@ def mutate_thread():
2425

2526
class TestShutdown(unittest.TestCase):
2627
def test_shutdown_race(self):
27-
import _thread
28-
import threading
29-
3028
ITERATIONS = 1_000
3129
STARTUP_THREADS = 4
3230

@@ -61,5 +59,6 @@ def startup_worker():
6159
if cm.exc_value is not None:
6260
raise cm.exc_value
6361

62+
6463
if __name__ == "__main__":
6564
unittest.main()

0 commit comments

Comments
 (0)