From 5e9168492f12c579b2481f3f3e0ae11f9d986857 Mon Sep 17 00:00:00 2001 From: Barney Gale Date: Tue, 5 Nov 2024 21:19:36 +0000 Subject: 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. --- Lib/test/test_pathlib/test_pathlib_abc.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'Lib/test/test_pathlib/test_pathlib_abc.py') 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') -- cgit v1.2.3