@@ -489,38 +489,6 @@ def test_realpath_strict(self):
489489 finally :
490490 os_helper .unlink (ABSTFN )
491491
492- def test_realpath_embedded_null (self ):
493- path = '/\x00 '
494- self .assertRaises (ValueError , realpath , path , strict = False )
495- self .assertRaises (ValueError , realpath , path , strict = True )
496- path = b'/\x00 '
497- self .assertRaises (ValueError , realpath , path , strict = False )
498- self .assertRaises (ValueError , realpath , path , strict = True )
499- path = '/nonexistent/x\x00 '
500- self .assertRaises (ValueError , realpath , path , strict = False )
501- self .assertRaises (FileNotFoundError , realpath , path , strict = True )
502- path = b'/nonexistent/x\x00 '
503- self .assertRaises (ValueError , realpath , path , strict = False )
504- self .assertRaises (FileNotFoundError , realpath , path , strict = True )
505-
506- @unittest .skipIf (sys .platform == 'win32' , 'requires native bytes paths' )
507- def test_realpath_unencodable (self ):
508- path = '/\ud800 '
509- self .assertRaises (UnicodeEncodeError , realpath , path , strict = False )
510- self .assertRaises (UnicodeEncodeError , realpath , path , strict = True )
511- path = '/nonexistent/\ud800 '
512- self .assertRaises (UnicodeEncodeError , realpath , path , strict = False )
513- self .assertRaises (FileNotFoundError , realpath , path , strict = True )
514-
515- @unittest .skipUnless (sys .platform == 'win32' , 'requires native Unicode paths' )
516- def test_realpath_undecodable (self ):
517- path = b'/\xff '
518- self .assertRaises (UnicodeDecodeError , realpath , path , strict = False )
519- self .assertRaises (UnicodeDecodeError , realpath , path , strict = True )
520- path = b'/nonexistent/\xff '
521- self .assertRaises (UnicodeDecodeError , realpath , path , strict = False )
522- self .assertRaises (FileNotFoundError , realpath , path , strict = True )
523-
524492 @os_helper .skip_unless_symlink
525493 @skip_if_ABSTFN_contains_backslash
526494 def test_realpath_relative (self ):
0 commit comments