Commits

Stefan H. Holek committed f420096

Fix a test broken by 984cedb.

  • Participants
  • Parent commits 8726755

Comments (0)

Files changed (1)

File setuptools/tests/test_upload_docs.py

 
         cmd = upload_docs(dist)
         cmd.upload_dir = self.upload_dir
-        zip_file = cmd.create_zipfile()
+        cmd.target_dir = self.upload_dir
+        tmp_dir = tempfile.mkdtemp()
+        tmp_file = os.path.join(tmp_dir, 'foo.zip')
+        try:
+            zip_file = cmd.create_zipfile(tmp_file)
 
-        assert zipfile.is_zipfile(zip_file)
+            assert zipfile.is_zipfile(tmp_file)
 
-        zip_f = zipfile.ZipFile(zip_file) # woh...
+            zip_file = zipfile.ZipFile(tmp_file) # woh...
 
-        assert zip_f.namelist() == ['index.html']
+            assert zip_file.namelist() == ['index.html']
+        finally:
+            shutil.rmtree(tmp_dir)
 
-