diff options
| author | Barney Gale <barney.gale@gmail.com> | 2023-12-09 15:07:40 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-09 15:07:40 (GMT) |
| commit | a98e7a8112f5d77fd647e70c4cf4264b2fd12288 (patch) | |
| tree | 894b26db92910391fb119bdd7db6bc77d9b116aa /Lib/test/test_pathlib.py | |
| parent | c98c40227e8cd976a08ff0f6dc386b5d33f62f84 (diff) | |
| download | cpython-a98e7a8112f5d77fd647e70c4cf4264b2fd12288.zip cpython-a98e7a8112f5d77fd647e70c4cf4264b2fd12288.tar.gz cpython-a98e7a8112f5d77fd647e70c4cf4264b2fd12288.tar.bz2 | |
GH-110109: Move pathlib ABCs to new `pathlib._abc` module. (#112881)
Move `_PurePathBase` and `_PathBase` to a new `pathlib._abc` module, and
drop the underscores from the class names.
Tests are mostly left alone in this commit, but they'll be similarly split
in a subsequent commit.
The `pathlib._abc` module will be published as an independent PyPI package
(similar to how `zipfile._path` is published as `zipp`), to be refined
and stabilised prior to its possible addition to the standard library.
Diffstat (limited to 'Lib/test/test_pathlib.py')
| -rw-r--r-- | Lib/test/test_pathlib.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py index d35516a..a1acba4 100644 --- a/Lib/test/test_pathlib.py +++ b/Lib/test/test_pathlib.py @@ -51,7 +51,7 @@ if hasattr(os, 'geteuid'): class PurePathBaseTest(unittest.TestCase): - cls = pathlib._PurePathBase + cls = pathlib._abc.PurePathBase def test_magic_methods(self): P = self.cls @@ -66,7 +66,7 @@ class PurePathBaseTest(unittest.TestCase): self.assertIs(P.__ge__, object.__ge__) -class DummyPurePath(pathlib._PurePathBase): +class DummyPurePath(pathlib._abc.PurePathBase): def __eq__(self, other): if not isinstance(other, DummyPurePath): return NotImplemented @@ -1586,7 +1586,7 @@ class PurePathSubclassTest(PurePathTest): # class PathBaseTest(PurePathBaseTest): - cls = pathlib._PathBase + cls = pathlib._abc.PathBase def test_unsupported_operation(self): P = self.cls @@ -1667,7 +1667,7 @@ class DummyPathIO(io.BytesIO): super().close() -class DummyPath(pathlib._PathBase): +class DummyPath(pathlib._abc.PathBase): """ Simple implementation of PathBase that keeps files and directories in memory. |
