mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
[3.11] gh-106242: Fix path truncation in os.path.normpath (GH-106816) (#107982)
Co-authored-by: Finn Womack <flan313@gmail.com>
This commit is contained in:
parent
db4400b5b2
commit
ccf81e1088
5 changed files with 31 additions and 10 deletions
|
@ -460,6 +460,10 @@ class CommonTest(GenericTest):
|
|||
for path in ('', '.', '/', '\\', '///foo/.//bar//'):
|
||||
self.assertIsInstance(self.pathmodule.normpath(path), str)
|
||||
|
||||
def test_normpath_issue106242(self):
|
||||
for path in ('\x00', 'foo\x00bar', '\x00\x00', '\x00foo', 'foo\x00'):
|
||||
self.assertEqual(self.pathmodule.normpath(path), path)
|
||||
|
||||
def test_abspath_issue3426(self):
|
||||
# Check that abspath returns unicode when the arg is unicode
|
||||
# with both ASCII and non-ASCII cwds.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue