@@ -472,23 +472,15 @@ def test_realpath_invalid_paths(self):
472472 self .assertRaises (UnicodeDecodeError , realpath , path , strict = ALLOW_MISSING )
473473 else :
474474 self .assertEqual (realpath (path , strict = False ), path )
475- if support .is_wasi :
476- self .assertRaises (OSError , realpath , path , strict = True )
477- self .assertRaises (OSError , realpath , path , strict = ALLOW_MISSING )
478- else :
479- self .assertRaises (FileNotFoundError , realpath , path , strict = True )
480- self .assertEqual (realpath (path , strict = ALLOW_MISSING ), path )
475+ self .assertRaises (FileNotFoundError , realpath , path , strict = True )
476+ self .assertEqual (realpath (path , strict = ALLOW_MISSING ), path )
481477 path = b'/nonexistent/\xff '
482478 if sys .platform == 'win32' :
483479 self .assertRaises (UnicodeDecodeError , realpath , path , strict = False )
484480 self .assertRaises (UnicodeDecodeError , realpath , path , strict = ALLOW_MISSING )
485481 else :
486482 self .assertEqual (realpath (path , strict = False ), path )
487- if support .is_wasi :
488- self .assertRaises (OSError , realpath , path , strict = True )
489- self .assertRaises (OSError , realpath , path , strict = ALLOW_MISSING )
490- else :
491- self .assertRaises (FileNotFoundError , realpath , path , strict = True )
483+ self .assertRaises (FileNotFoundError , realpath , path , strict = True )
492484
493485 @unittest .skipUnless (hasattr (os , "symlink" ),
494486 "Missing symlink implementation" )
0 commit comments