Skip to content

Commit 5edbc2e

Browse files
committed
Use os_helper for temporary directory
1 parent b612154 commit 5edbc2e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Lib/test/test_tarfile.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import sys
33
import os
44
import io
5-
import tempfile
65
from hashlib import sha256
76
from contextlib import contextmanager, ExitStack
87
from random import Random
@@ -4333,7 +4332,7 @@ def test_chown_links_on_extract(self):
43334332
buf.seek(0)
43344333
with (
43354334
self.subTest(f"type={link_type!r}"),
4336-
tempfile.TemporaryDirectory() as tmpdir,
4335+
os_helper.temp_dir() as tmpdir,
43374336
tarfile.open(fileobj=buf) as tar,
43384337
unittest.mock.patch("os.chown") as mock_chown,
43394338
unittest.mock.patch("os.lchown") as mock_lchown,
@@ -4382,7 +4381,7 @@ def test_chown_links_on_extractall(self):
43824381
buf.seek(0)
43834382
with (
43844383
self.subTest(f"type={link_type!r}"),
4385-
tempfile.TemporaryDirectory() as tmpdir,
4384+
os_helper.temp_dir() as tmpdir,
43864385
tarfile.open(fileobj=buf) as tar,
43874386
unittest.mock.patch("os.chown") as mock_chown,
43884387
unittest.mock.patch("os.lchown") as mock_lchown,

0 commit comments

Comments
 (0)