8000 Fix test_ntpath (pass 1) · python/cpython@7362f7e · GitHub
[go: up one dir, main page]

Skip to content

Commit 7362f7e

Browse files
committed
Fix test_ntpath (pass 1)
1 parent 86c318c commit 7362f7e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Lib/test/test_ntpath.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,13 +415,11 @@ def test_realpath_symlink_loops_strict(self):
415415
self.assertRaises(OSError, ntpath.realpath, ABSTFN + "1", strict=True)
416416
self.assertRaises(OSError, ntpath.realpath, ABSTFN + "2", strict=True)
417417
self.assertRaises(OSError, ntpath.realpath, ABSTFN + "1\\x", strict=True)
418-
418+
self.assertRaises(OSError, ntpath.realpath, ABSTFN + "1\\..\\x", strict=True)
419419
# Windows eliminates '..' components before resolving links, so the
420-
# following 3 realpath() calls are not expected to raise.
420+
# following 2 realpath() calls are not expected to raise.
421421
self.assertPathEqual(ntpath.realpath(ABSTFN + "1\\..", strict=True),
422422
ntpath.dirname(ABSTFN))
423-
self.assertPathEqual(ntpath.realpath(ABSTFN + "1\\..\\x", strict=True),
424-
ntpath.dirname(ABSTFN) + "\\x")
425423
os.symlink(ABSTFN + "x", ABSTFN + "y")
426424
self.assertPathEqual(ntpath.realpath(ABSTFN + "1\\..\\"
427425
+ ntpath.basename(ABSTFN) + "y",

0 commit comments

Comments
 (0)
0