Skip to content

Commit 600fc9e

Browse files
committed
Second pass on fixing ntpath tests
1 parent 0634486 commit 600fc9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_ntpath.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,14 +369,14 @@ def test_realpath_symlink_loops(self):
369369
ABSTFN + "1\\..\\" + ntpath.basename(ABSTFN) + "1")
370370

371371
os.symlink(ntpath.basename(ABSTFN) + "a\\b", ABSTFN + "a")
372-
self.assertPathEqual(ntpath.realpath(ABSTFN + "a"), ABSTFN + "a")
372+
self.assertRaises(OSError, ntpath.realpath, ABSTFN + "a")
373373

374374
os.symlink("..\\" + ntpath.basename(ntpath.dirname(ABSTFN))
375375
+ "\\" + ntpath.basename(ABSTFN) + "c", ABSTFN + "c")
376-
self.assertPathEqual(ntpath.realpath(ABSTFN + "c"), ABSTFN + "c")
376+
self.assertRaises(OSError, ntpath.realpath, ABSTFN + "c")
377377

378378
# Test using relative path as well.
379-
self.assertPathEqual(ntpath.realpath(ntpath.basename(ABSTFN)), ABSTFN)
379+
self.assertRaises(OSError, ntpath.realpath, ntpath.basename(ABSTFN))
380380

381381
@os_helper.skip_unless_symlink
382382
@unittest.skipUnless(HAVE_GETFINALPATHNAME, 'need _getfinalpathname')

0 commit comments

Comments
 (0)