Commit 47598ca2 authored by Stefan H. Holek's avatar Stefan H. Holek

Fix a test broken by 984cedb.

--HG--
branch : distribute
extra : rebase_source : f9fe65a5b00a1a64f812aa99716cc913a4b39188
parent 1dbc66bc
......@@ -54,12 +54,17 @@ class TestUploadDocsTest(unittest.TestCase):
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...
assert zip_f.namelist() == ['index.html']
zip_file = zipfile.ZipFile(tmp_file) # woh...
assert zip_file.namelist() == ['index.html']
finally:
shutil.rmtree(tmp_dir)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment