aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_pathlib/test_join.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pathlib/test_join.py')
-rw-r--r--Lib/test/test_pathlib/test_join.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/Lib/test/test_pathlib/test_join.py b/Lib/test/test_pathlib/test_join.py
index 03a3ecfd248..f1a24204b4c 100644
--- a/Lib/test/test_pathlib/test_join.py
+++ b/Lib/test/test_pathlib/test_join.py
@@ -4,9 +4,13 @@ Tests for pathlib.types._JoinablePath
import unittest
-from pathlib import PurePath, Path
-from pathlib.types import _PathParser, _JoinablePath
-from test.test_pathlib.support.lexical_path import LexicalPath
+from .support import is_pypi
+from .support.lexical_path import LexicalPath
+
+if is_pypi:
+ from pathlib_abc import _PathParser, _JoinablePath
+else:
+ from pathlib.types import _PathParser, _JoinablePath
class JoinTestBase:
@@ -355,12 +359,14 @@ class LexicalPathJoinTest(JoinTestBase, unittest.TestCase):
cls = LexicalPath
-class PurePathJoinTest(JoinTestBase, unittest.TestCase):
- cls = PurePath
+if not is_pypi:
+ from pathlib import PurePath, Path
+ class PurePathJoinTest(JoinTestBase, unittest.TestCase):
+ cls = PurePath
-class PathJoinTest(JoinTestBase, unittest.TestCase):
- cls = Path
+ class PathJoinTest(JoinTestBase, unittest.TestCase):
+ cls = Path
if __name__ == "__main__":