diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2013-06-18 14:08:20 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-06-18 14:08:20 -0500 |
commit | a85aa143f971ebfbb31ccaf58cb82a311f9315c6 (patch) | |
tree | eeae1529ae15884aca3301fefae768fc2e531a18 /setuptools/tests/test_upload_docs.py | |
parent | 94fc39cb62df19e85b07658f2fa5d0b4a7bf9303 (diff) | |
parent | 641eac6550896506fa939205f249bcfb8f057d57 (diff) | |
download | python-setuptools-git-a85aa143f971ebfbb31ccaf58cb82a311f9315c6.tar.gz |
Merge Vinay Sajip's unified Python 2/3 support from distribute 3
--HG--
branch : distribute
Diffstat (limited to 'setuptools/tests/test_upload_docs.py')
-rw-r--r-- | setuptools/tests/test_upload_docs.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/setuptools/tests/test_upload_docs.py b/setuptools/tests/test_upload_docs.py index 8b2dc892..769f16cc 100644 --- a/setuptools/tests/test_upload_docs.py +++ b/setuptools/tests/test_upload_docs.py @@ -54,12 +54,19 @@ 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... + zip_file = zipfile.ZipFile(tmp_file) # woh... - assert zip_f.namelist() == ['index.html'] + assert zip_file.namelist() == ['index.html'] + zip_file.close() + finally: + shutil.rmtree(tmp_dir) |