Skip to content

Commit 9a1c8ae

Browse files
committed
gh-116738: Use os_helper.temp_dir()
1 parent f5f03ec commit 9a1c8ae

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_free_threading/test_dbm_gnu.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import unittest
22

3-
from test.support import import_helper, threading_helper
3+
from test.support import import_helper, os_helper, threading_helper
44
from test.support.threading_helper import run_concurrently
55

6-
import tempfile
76
import threading
87

98
gdbm = import_helper.import_module("dbm.gnu")
@@ -67,7 +66,7 @@ def gdbm_multi_op_worker(db):
6766
for i in range(KEY_PER_THREAD):
6867
db[f"key_{tid}_{i}"] = f"value_{tid}_{i}"
6968

70-
with tempfile.TemporaryDirectory() as tmpdirname:
69+
with os_helper.temp_dir() as tmpdirname:
7170
db = gdbm.open(f"{tmpdirname}/{gdbm_filename}", "c")
7271
run_concurrently(
7372
worker_func=gdbm_multi_op_worker, nthreads=NTHREADS, args=(db,)

0 commit comments

Comments
 (0)