Skip to content
Merged
Prev Previous commit
Next Next commit
Merge branch 'main' into gh-78079-win-device-path-roots
  • Loading branch information
barneygale committed Mar 10, 2023
commit bb0af916a495a7aa974cd6dc1c100bfc1dba3c93
8 changes: 8 additions & 0 deletions Lib/test/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,14 @@ def test_join(self):
self.assertEqual(pp, P('C:/a/b/x/y'))
pp = p.joinpath('c:/x/y')
self.assertEqual(pp, P('C:/x/y'))
# Joining with files with NTFS data streams => the filename should
# not be parsed as a drive letter
pp = p.joinpath(P('./d:s'))
self.assertEqual(pp, P('C:/a/b/d:s'))
pp = p.joinpath(P('./dd:s'))
self.assertEqual(pp, P('C:/a/b/dd:s'))
pp = p.joinpath(P('E:d:s'))
self.assertEqual(pp, P('E:d:s'))
# Joining onto a UNC path with no root
pp = P('//').joinpath('server')
self.assertEqual(pp, P('//server'))
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.