From 47598ca259c8870efa3061144493758c187deb3d Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" Date: Fri, 19 Oct 2012 11:35:52 +0200 Subject: Fix a test broken by 984cedb. --HG-- branch : distribute extra : rebase_source : f9fe65a5b00a1a64f812aa99716cc913a4b39188 --- setuptools/tests/test_upload_docs.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'setuptools/tests/test_upload_docs.py') 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) -- cgit v1.2.1