@@ -1351,7 +1351,6 @@ def test_unsupported_operation(self):
13511351 p = self .cls ('' )
13521352 e = UnsupportedOperation
13531353 self .assertRaises (e , p .stat )
1354- self .assertRaises (e , p .lstat )
13551354 self .assertRaises (e , p .exists )
13561355 self .assertRaises (e , p .samefile , 'foo' )
13571356 self .assertRaises (e , p .is_dir )
@@ -2671,17 +2670,6 @@ def test_stat_no_follow_symlinks_nosymlink(self):
26712670 st = p .stat ()
26722671 self .assertEqual (st , p .stat (follow_symlinks = False ))
26732672
2674- @needs_symlinks
2675- def test_lstat (self ):
2676- p = self .cls (self .base )/ 'linkA'
2677- st = p .stat ()
2678- self .assertNotEqual (st , p .lstat ())
2679-
2680- def test_lstat_nosymlink (self ):
2681- p = self .cls (self .base ) / 'fileA'
2682- st = p .stat ()
2683- self .assertEqual (st , p .lstat ())
2684-
26852673 def test_is_dir (self ):
26862674 P = self .cls (self .base )
26872675 self .assertTrue ((P / 'dirA' ).is_dir ())
@@ -2868,11 +2856,13 @@ def test_delete_dir(self):
28682856 base = self .cls (self .base )
28692857 base .joinpath ('dirA' )._delete ()
28702858 self .assertRaises (FileNotFoundError , base .joinpath ('dirA' ).stat )
2871- self .assertRaises (FileNotFoundError , base .joinpath ('dirA' , 'linkC' ).lstat )
2859+ self .assertRaises (FileNotFoundError , base .joinpath ('dirA' , 'linkC' ).stat ,
2860+ follow_symlinks = False )
28722861 base .joinpath ('dirB' )._delete ()
28732862 self .assertRaises (FileNotFoundError , base .joinpath ('dirB' ).stat )
28742863 self .assertRaises (FileNotFoundError , base .joinpath ('dirB' , 'fileB' ).stat )
2875- self .assertRaises (FileNotFoundError , base .joinpath ('dirB' , 'linkD' ).lstat )
2864+ self .assertRaises (FileNotFoundError , base .joinpath ('dirB' , 'linkD' ).stat ,
2865+ follow_symlinks = False )
28762866 base .joinpath ('dirC' )._delete ()
28772867 self .assertRaises (FileNotFoundError , base .joinpath ('dirC' ).stat )
28782868 self .assertRaises (FileNotFoundError , base .joinpath ('dirC' , 'dirD' ).stat )
0 commit comments