Skip to content

Commit cce2566

Browse files
Correct the fix for WASI.
1 parent 1b3267c commit cce2566

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/test/test_posixpath.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -550,18 +550,18 @@ def test_realpath_invalid_paths(self):
550550
else:
551551
self.assertEqual(realpath(path, strict=False), path)
552552
if support.is_wasi:
553-
self.assertRaises(FileNotFoundError, realpath, path, strict=True)
554-
else:
555553
self.assertRaises(OSError, realpath, path, strict=True)
554+
else:
555+
self.assertRaises(FileNotFoundError, realpath, path, strict=True)
556556
path = b'/nonexistent/\xff'
557557
if sys.platform == 'win32':
558558
self.assertRaises(UnicodeDecodeError, realpath, path, strict=False)
559559
else:
560560
self.assertEqual(realpath(path, strict=False), path)
561561
if support.is_wasi:
562-
self.assertRaises(FileNotFoundError, realpath, path, strict=True)
563-
else:
564562
self.assertRaises(OSError, realpath, path, strict=True)
563+
else:
564+
self.assertRaises(FileNotFoundError, realpath, path, strict=True)
565565

566566
@os_helper.skip_unless_symlink
567567
@skip_if_ABSTFN_contains_backslash

0 commit comments

Comments
 (0)