[Python-checkins] r72988 - in python/branches/py3k: Lib/distutils/tests/test_archive_util.py
tarek.ziade
python-checkins at python.org
Thu May 28 16:03:00 CEST 2009
Author: tarek.ziade
Date: Thu May 28 16:02:58 2009
New Revision: 72988
Log:
Merged revisions 72986 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r72986 | tarek.ziade | 2009-05-28 15:55:51 +0200 (Thu, 28 May 2009) | 1 line
using 'tar' then 'gzip' in the test, because 'tar -czf' is not supported under some platforms
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Lib/distutils/tests/test_archive_util.py
Modified: python/branches/py3k/Lib/distutils/tests/test_archive_util.py
==============================================================================
--- python/branches/py3k/Lib/distutils/tests/test_archive_util.py (original)
+++ python/branches/py3k/Lib/distutils/tests/test_archive_util.py Thu May 28 16:02:58 2009
@@ -20,6 +20,7 @@
ZIP_SUPPORT = find_executable('zip')
class ArchiveUtilTestCase(support.TempdirManager,
+ support.LoggingSilencer,
unittest.TestCase):
def test_make_tarball(self):
@@ -82,7 +83,8 @@
base_name = os.path.join(tmpdir2, 'archive')
return tmpdir, tmpdir2, base_name
- @unittest.skipUnless(find_executable('tar'), 'Need the tar command to run')
+ @unittest.skipUnless(find_executable('tar') and find_executable('gzip'),
+ 'Need the tar command to run')
def test_tarfile_vs_tar(self):
tmpdir, tmpdir2, base_name = self._create_files()
old_dir = os.getcwd()
@@ -98,11 +100,13 @@
# now create another tarball using `tar`
tarball2 = os.path.join(tmpdir, 'archive2.tar.gz')
- cmd = ['tar', '-czf', 'archive2.tar.gz', 'dist']
+ tar_cmd = ['tar', '-cf', 'archive2.tar', 'dist']
+ gzip_cmd = ['gzip', '-f9', 'archive2.tar']
old_dir = os.getcwd()
os.chdir(tmpdir)
try:
- spawn(cmd)
+ spawn(tar_cmd)
+ spawn(gzip_cmd)
finally:
os.chdir(old_dir)
More information about the Python-checkins
mailing list