diff options
author | Barney Gale <barney.gale@gmail.com> | 2025-03-11 18:01:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-11 18:01:43 +0000 |
commit | 3569e4a670bc6a02f1bb1baf08ecfb85c63755fb (patch) | |
tree | 82adc8f3a65bddc63389cd6308ec2ab0cdbde585 /Lib/test/test_pathlib/support | |
parent | e0bc9d2a0c448cf46df233f8d84344c1f55a190f (diff) | |
download | cpython-3569e4a670bc6a02f1bb1baf08ecfb85c63755fb.tar.gz cpython-3569e4a670bc6a02f1bb1baf08ecfb85c63755fb.zip |
GH-130614: pathlib ABCs: revise test suite for Windows path joining (#131016)
Test Windows-flavoured `pathlib.types._JoinablePath` in a dedicated test
module. These tests cover `LexicalWindowsPath`, `PureWindowsPath` and
`WindowsPath`, where `LexicalWindowsPath` is a simple implementation of
`_JoinablePath` for use in tests.
Diffstat (limited to 'Lib/test/test_pathlib/support')
-rw-r--r-- | Lib/test/test_pathlib/support/lexical_path.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_pathlib/support/lexical_path.py b/Lib/test/test_pathlib/support/lexical_path.py index 27dec30d0bd..6298513de6c 100644 --- a/Lib/test/test_pathlib/support/lexical_path.py +++ b/Lib/test/test_pathlib/support/lexical_path.py @@ -2,6 +2,7 @@ Simple implementation of JoinablePath, for use in pathlib tests. """ +import ntpath import os.path import pathlib.types import posixpath @@ -37,3 +38,8 @@ class LexicalPath(pathlib.types._JoinablePath): class LexicalPosixPath(LexicalPath): __slots__ = () parser = posixpath + + +class LexicalWindowsPath(LexicalPath): + __slots__ = () + parser = ntpath |