diff options
author | Nice Zombies <nineteendo19d0@gmail.com> | 2024-11-12 22:18:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-12 21:18:03 +0000 |
commit | 4b00aba42e4d9440d22e399ec2122fe8601bbe54 (patch) | |
tree | 4de6297865b11706f73f1ed22351542822396a65 /Lib/test/test_ntpath.py | |
parent | 5610860840aa71b186fc5639211dd268b817d65f (diff) | |
download | cpython-4b00aba42e4d9440d22e399ec2122fe8601bbe54.tar.gz cpython-4b00aba42e4d9440d22e399ec2122fe8601bbe54.zip |
gh-119826: Improved fallback for ntpath.abspath() on Windows (GH-119938)
Diffstat (limited to 'Lib/test/test_ntpath.py')
-rw-r--r-- | Lib/test/test_ntpath.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py index 64cbfaaaaa0..4f59184dfcf 100644 --- a/Lib/test/test_ntpath.py +++ b/Lib/test/test_ntpath.py @@ -806,6 +806,9 @@ class TestNtpath(NtpathTestCase): tester('ntpath.abspath("C:\\spam. . .")', "C:\\spam") tester('ntpath.abspath("C:/nul")', "\\\\.\\nul") tester('ntpath.abspath("C:\\nul")', "\\\\.\\nul") + self.assertTrue(ntpath.isabs(ntpath.abspath("C:spam"))) + self.assertEqual(ntpath.abspath("C:\x00"), ntpath.join(ntpath.abspath("C:"), "\x00")) + self.assertEqual(ntpath.abspath("\x00:spam"), "\x00:\\spam") tester('ntpath.abspath("//..")', "\\\\") tester('ntpath.abspath("//../")', "\\\\..\\") tester('ntpath.abspath("//../..")', "\\\\..\\") |