am c47f47b7: am 5d60719e: Merge "Run ZipFile.testzip() during zipfile tests."

* commit 'c47f47b74f6ed6daa83e3f4357cf315a4b617f6e':
  Run ZipFile.testzip() during zipfile tests.
This commit is contained in:
Dan Albert 2015-03-24 00:18:47 +00:00 committed by Android Git Automerger
commit 220a0332d3
1 changed files with 2 additions and 0 deletions

View File

@ -62,6 +62,7 @@ class CommonZipTest(unittest.TestCase):
new_stat = os.stat(test_file_name)
self.assertEqual(int(old_stat.st_mode), int(new_stat.st_mode))
self.assertEqual(int(old_stat.st_mtime), int(new_stat.st_mtime))
self.assertIsNone(zip_file.testzip())
zip_file.close()
zip_file = zipfile.ZipFile(zip_file_name, "r")
@ -71,6 +72,7 @@ class CommonZipTest(unittest.TestCase):
mode = (info.external_attr >> 16) & 0o777
self.assertEqual(mode, expected_mode)
self.assertEqual(zip_file.read(arcname), contents)
self.assertIsNone(zip_file.testzip())
finally:
os.remove(test_file_name)
os.remove(zip_file_name)