Skip to content

Commit 2f4c93a

Browse files
committed
Fix tests for Python 3.10
1 parent f94f42a commit 2f4c93a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_paths_stdlib.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import sys
2020
import unittest
2121
from test import support # type: ignore
22-
from test.support import TESTFN # type: ignore
2322
from typing import Set
2423
from unittest import mock
2524

@@ -37,6 +36,13 @@
3736
except ImportError:
3837
grp = pwd = None # type: ignore
3938

39+
if sys.version_info[:2] >= (3, 10):
40+
# stdlib
41+
from test.support.os_helper import TESTFN
42+
else:
43+
# stdlib
44+
from test.support import TESTFN
45+
4046
# Make sure any symbolic links in the base test path are resolved.
4147
BASE = os.path.realpath(TESTFN)
4248
join = lambda *x: os.path.join(BASE, *x)

0 commit comments

Comments
 (0)