summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pathlib/test_pathlib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_pathlib/test_pathlib.py')
-rw-r--r--Lib/test/test_pathlib/test_pathlib.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_pathlib/test_pathlib.py b/Lib/test/test_pathlib/test_pathlib.py
index b47b4a1..c7104bf 100644
--- a/Lib/test/test_pathlib/test_pathlib.py
+++ b/Lib/test/test_pathlib/test_pathlib.py
@@ -131,6 +131,15 @@ class PurePathTest(test_pathlib_abc.DummyPurePathTest):
self.assertEqual(P(P('a'), P('b'), P('c')), P(FakePath("a/b/c")))
self.assertEqual(P(P('./a:b')), P('./a:b'))
+ @needs_windows
+ def test_constructor_nested_foreign_flavour(self):
+ # See GH-125069.
+ p1 = pathlib.PurePosixPath('b/c:\\d')
+ p2 = pathlib.PurePosixPath('b/', 'c:\\d')
+ self.assertEqual(p1, p2)
+ self.assertEqual(self.cls(p1), self.cls('b/c:/d'))
+ self.assertEqual(self.cls(p2), self.cls('b/c:/d'))
+
def _check_parse_path(self, raw_path, *expected):
sep = self.parser.sep
actual = self.cls._parse_path(raw_path.replace('/', sep))