result_path = result_path + p_path
## add separator between UNC and non-absolute path
if (result_path and not result_root and
- result_drive and result_drive[-1:] != colon):
+ result_drive and result_drive[-1:] not in colon + seps):
return result_drive + sep + result_path
return result_drive + result_root + result_path
except (TypeError, AttributeError, BytesWarning):
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')