Skip to content
Merged
Prev Previous commit
Next Next commit
Test handling of UNC paths with incomplete drives in joinpath()
  • Loading branch information
barneygale committed Mar 10, 2023
commit aea236e5f429f86e041bb7b2808783e47909320e
7 changes: 7 additions & 0 deletions Lib/test/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,13 @@ 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 onto a UNC path with no root
pp = P('//').joinpath('server')
self.assertEqual(pp, P('//server'))
pp = P('//server').joinpath('share')
self.assertEqual(pp, P('//server/share'))
pp = P('//./BootPartition').joinpath('Windows')
self.assertEqual(pp, P('//./BootPartition/Windows'))

def test_div(self):
# Basically the same as joinpath().
Expand Down