mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
gh-119826: Improved fallback for ntpath.abspath() on Windows (GH-119938)
This commit is contained in:
parent
5610860840
commit
4b00aba42e
3 changed files with 35 additions and 18 deletions
|
@ -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("//../..")', "\\\\..\\")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue