diff options
author | Barney Gale <barney.gale@gmail.com> | 2024-11-05 21:19:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-05 21:19:36 +0000 |
commit | 5e9168492f12c579b2481f3f3e0ae11f9d986857 (patch) | |
tree | 08e03f719d3f6eb690b70e7d8b246731d6dae31a /Lib/test/test_pathlib/test_pathlib_abc.py | |
parent | f51fd84034e2cbf458321c25ba6fd085a39d6f6f (diff) | |
download | cpython-5e9168492f12c579b2481f3f3e0ae11f9d986857.tar.gz cpython-5e9168492f12c579b2481f3f3e0ae11f9d986857.zip |
pathlib ABCs: defer path joining (#126409)
Defer joining of path segments in the private `PurePathBase` ABC. The new
behaviour matches how the public `PurePath` class handles path segments.
This removes a hard-to-grok difference between the ABCs and the main
classes. It also slightly reduces the size of `PurePath` objects by
eliminating a `_raw_path` slot.
Diffstat (limited to 'Lib/test/test_pathlib/test_pathlib_abc.py')
-rw-r--r-- | Lib/test/test_pathlib/test_pathlib_abc.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Lib/test/test_pathlib/test_pathlib_abc.py b/Lib/test/test_pathlib/test_pathlib_abc.py index 4ab804850e9..d155e7c5bb9 100644 --- a/Lib/test/test_pathlib/test_pathlib_abc.py +++ b/Lib/test/test_pathlib/test_pathlib_abc.py @@ -86,11 +86,6 @@ class PurePathBaseTest(unittest.TestCase): p.suffix with self.assertRaises(e): p.suffixes - with self.assertRaises(e): - p / 'bar' - with self.assertRaises(e): - 'bar' / p - self.assertRaises(e, p.joinpath, 'bar') self.assertRaises(e, p.with_name, 'bar') self.assertRaises(e, p.with_stem, 'bar') self.assertRaises(e, p.with_suffix, '.txt') |