@@ -415,16 +415,15 @@ 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- self .assertRaises (OSError , ntpath .realpath , ABSTFN + "1\\ ..\\ x" , strict = True )
419418 # Windows eliminates '..' components before resolving links, so the
420- # following 2 realpath() calls are not expected to raise.
419+ # following call is not expected to raise.
421420 self .assertPathEqual (ntpath .realpath (ABSTFN + "1\\ .." , strict = True ),
422421 ntpath .dirname (ABSTFN ))
422+ self .assertRaises (OSError , ntpath .realpath , ABSTFN + "1\\ ..\\ x" , strict = True )
423423 os .symlink (ABSTFN + "x" , ABSTFN + "y" )
424- self .assertPathEqual ( ntpath .realpath ( ABSTFN + "1\\ ..\\ "
424+ self .assertRaises ( OSError , ntpath .realpath , ABSTFN + "1\\ ..\\ "
425425 + ntpath .basename (ABSTFN ) + "y" ,
426- strict = True ),
427- ABSTFN + "x" )
426+ strict = True )
428427 self .assertRaises (OSError , ntpath .realpath ,
429428 ABSTFN + "1\\ ..\\ " + ntpath .basename (ABSTFN ) + "1" ,
430429 strict = True )
0 commit comments