Lines Matching refs:BadZipfile
583 raise zipfile.BadZipfile()
584 except zipfile.BadZipfile:
847 except zipfile.BadZipfile:
871 """Check that zipfiles with missing bytes at the end raise BadZipFile."""
879 # a BadZipFile exception is raised when we try to open it
882 self.assertRaises(zipfile.BadZipfile, zipfile.ZipFile, fp)
923 self.assertRaises(zipfile.BadZipfile, zipfile.ZipFile, TESTFN)
927 self.assertRaises(zipfile.BadZipfile, zipfile.ZipFile, TESTFN)
1075 """Tests that files with bad CRCs raise a BadZipfile exception when read."""
1080 self.assertRaises(zipfile.BadZipfile, zipf.read, 'afile')
1085 self.assertRaises(zipfile.BadZipfile, corrupt_file.read)
1091 with self.assertRaises(zipfile.BadZipfile):
1129 except zipfile.BadZipfile:
1141 # raises a BadZipfile exception (rather than the previously unhelpful
1145 self.assertRaises(zipfile.BadZipfile, zipfile.ZipFile, TESTFN, 'r')