aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_pathlib/support/lexical_path.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pathlib/support/lexical_path.py')
-rw-r--r--Lib/test/test_pathlib/support/lexical_path.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/test/test_pathlib/support/lexical_path.py b/Lib/test/test_pathlib/support/lexical_path.py
index 6298513de6c..f29a521af9b 100644
--- a/Lib/test/test_pathlib/support/lexical_path.py
+++ b/Lib/test/test_pathlib/support/lexical_path.py
@@ -4,11 +4,17 @@ Simple implementation of JoinablePath, for use in pathlib tests.
import ntpath
import os.path
-import pathlib.types
import posixpath
+from . import is_pypi
-class LexicalPath(pathlib.types._JoinablePath):
+if is_pypi:
+ from pathlib_abc import _JoinablePath
+else:
+ from pathlib.types import _JoinablePath
+
+
+class LexicalPath(_JoinablePath):
__slots__ = ('_segments',)
parser = os.path