Skip to content

Commit 7c6a65b

Browse files
Skip the moved tests on Posix.
1 parent 4beaf4c commit 7c6a65b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Lib/test/test_ntpath.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,11 @@ def test_abspath(self):
972972

973973
def test_abspath_invalid_paths(self):
974974
abspath = ntpath.abspath
975-
self.assertEqual(abspath("C:\x00"), ntpath.join(abspath("C:"), "\x00"))
976-
self.assertEqual(abspath("\x00:spam"), "\x00:\\spam")
975+
if sys.platform == 'win32':
976+
self.assertEqual(abspath("C:\x00"), ntpath.join(abspath("C:"), "\x00"))
977+
self.assertEqual(abspath(b"C:\x00"), ntpath.join(abspath(b"C:"), b"\x00"))
978+
self.assertEqual(abspath("\x00:spam"), "\x00:\\spam")
979+
self.assertEqual(abspath(b"\x00:spam"), b"\x00:\\spam")
977980
self.assertEqual(abspath('c:\\fo\x00o'), 'c:\\fo\x00o')
978981
self.assertEqual(abspath(b'c:\\fo\x00o'), b'c:\\fo\x00o')
979982
self.assertEqual(abspath('c:\\fo\x00o\\..\\bar'), 'c:\\bar')

0 commit comments

Comments
 (0)