diff options
author | Stefan H. Holek <stefan@epy.co.at> | 2012-10-19 11:35:52 +0200 |
---|---|---|
committer | Stefan H. Holek <stefan@epy.co.at> | 2012-10-19 11:35:52 +0200 |
commit | 47598ca259c8870efa3061144493758c187deb3d (patch) | |
tree | 0f6d67e2da731c9ab0bf4bd513905ebc5b40b3bc /setuptools/tests/test_upload_docs.py | |
parent | 1dbc66bcd9190ce6f26e74b343a2133ac64ce611 (diff) | |
download | external_python_setuptools-47598ca259c8870efa3061144493758c187deb3d.tar.gz external_python_setuptools-47598ca259c8870efa3061144493758c187deb3d.tar.bz2 external_python_setuptools-47598ca259c8870efa3061144493758c187deb3d.zip |
Fix a test broken by 984cedb.
--HG--
branch : distribute
extra : rebase_source : f9fe65a5b00a1a64f812aa99716cc913a4b39188
Diffstat (limited to 'setuptools/tests/test_upload_docs.py')
-rw-r--r-- | setuptools/tests/test_upload_docs.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index 8b2dc892..fddb755d 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -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) |