1. Daniel Holth
  2. wheel


Daniel Holth  committed 5278754

improve zipfile.pop() test

  • Participants
  • Parent commits c908475
  • Branches default

Comments (0)

Files changed (2)

File wheel/install.py

View file
     def pop(self):
         """Truncate the last file off this zipfile.
         Assumes infolist() is in the same order as the files (true for
-        ordinary zip files)"""    
+        ordinary zip files created by Python)"""
         if not self.fp:
             raise RuntimeError(
                   "Attempt to pop from ZIP archive that was already closed")

File wheel/test/test_wheelfile.py

View file
         pass # already closed
         raise Exception("expected RuntimeError")
+    zf = wheel.install.VerifyingZipFile(sio, 'a')
+    zf.pop()
+    zf.close()
+    zf = wheel.install.VerifyingZipFile(sio, 'r')
+    assert len(zf.infolist()) == 1