GH-103220: Fix ntpath.join() of partial UNC drive with trailing slash (GH-103221)

This commit is contained in:
Barney Gale 2023-04-11 17:26:45 +01:00 committed by GitHub
parent 50b4b15984
commit b57105ae33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -300,6 +300,11 @@ class TestNtpath(NtpathTestCase):
tester("ntpath.join('//computer/share', 'a', 'b')", '//computer/share\\a\\b')
tester("ntpath.join('//computer/share', 'a/b')", '//computer/share\\a/b')
tester("ntpath.join('\\\\', 'computer')", '\\\\computer')
tester("ntpath.join('\\\\computer\\', 'share')", '\\\\computer\\share')
tester("ntpath.join('\\\\computer\\share\\', 'a')", '\\\\computer\\share\\a')
tester("ntpath.join('\\\\computer\\share\\a\\', 'b')", '\\\\computer\\share\\a\\b')
def test_normpath(self):
tester("ntpath.normpath('A//////././//.//B')", r'A\B')
tester("ntpath.normpath('A/./B')", r'A\B')