File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,6 +232,12 @@ def test_empty_tarfile(self):
232232 finally :
233233 tar .close ()
234234
235+ def test_non_existent_tarfile (self ):
236+ # Test for issue11513: prevent non-existent gzipped tarfiles raising
237+ # multiple exceptions.
238+ with self .assertRaisesRegex (FileNotFoundError , "xxx" ):
239+ tarfile .open ("xxx" , self .mode )
240+
235241 def test_null_tarfile (self ):
236242 # Test for issue6123: Allow opening empty archives.
237243 # This test guarantees that tarfile.open() does not treat an empty
@@ -444,11 +450,7 @@ class MiscReadTest(MiscReadTestBase, unittest.TestCase):
444450 test_fail_comp = None
445451
446452class GzipMiscReadTest (GzipTest , MiscReadTestBase , unittest .TestCase ):
447- def test_non_existent_targz_file (self ):
448- # Test for issue11513: prevent non-existent gzipped tarfiles raising
449- # multiple exceptions.
450- with self .assertRaisesRegex (FileNotFoundError , "xxx" ):
451- tarfile .open ("xxx" , self .mode )
453+ pass
452454
453455class Bz2MiscReadTest (Bz2Test , MiscReadTestBase , unittest .TestCase ):
454456 def test_no_name_argument (self ):
You can’t perform that action at this time.
0 commit comments