summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/tests
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-05-18 08:22:38 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-05-18 08:22:38 (GMT)
commit40c00271fe8ae1b2b507a66f96f47adb97fa89f2 (patch)
tree49d616bc9ed32dd9e5048980698aed337d10b660 /Lib/distutils/tests
parentd18a84ee16bf6d8e8e86aba981afa8a865f27efd (diff)
downloadcpython-40c00271fe8ae1b2b507a66f96f47adb97fa89f2.zip
cpython-40c00271fe8ae1b2b507a66f96f47adb97fa89f2.tar.gz
cpython-40c00271fe8ae1b2b507a66f96f47adb97fa89f2.tar.bz2
Merged revisions 72764 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72764 | tarek.ziade | 2009-05-18 10:20:55 +0200 (Mon, 18 May 2009) | 1 line working with relative paths to avoid tar warnings on absolute paths ........
Diffstat (limited to 'Lib/distutils/tests')
-rw-r--r--Lib/distutils/tests/test_archive_util.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test_archive_util.py
index 3e1e04a..1c88457 100644
--- a/Lib/distutils/tests/test_archive_util.py
+++ b/Lib/distutils/tests/test_archive_util.py
@@ -27,7 +27,14 @@ class ArchiveUtilTestCase(support.TempdirManager,
tmpdir2 = self.mkdtemp()
base_name = os.path.join(tmpdir2, 'archive')
- make_tarball(base_name, tmpdir)
+
+ # working with relative paths to avoid tar warnings
+ old_dir = os.getcwd()
+ os.chdir(tmpdir)
+ try:
+ make_tarball(base_name, '.')
+ finally:
+ os.chdir(old_dir)
# check if the compressed tarball was created
tarball = base_name + '.tar.gz'
@@ -35,7 +42,12 @@ class ArchiveUtilTestCase(support.TempdirManager,
# trying an uncompressed one
base_name = os.path.join(tmpdir2, 'archive')
- make_tarball(base_name, tmpdir, compress=None)
+ old_dir = os.getcwd()
+ os.chdir(tmpdir)
+ try:
+ make_tarball(base_name, '.', compress=None)
+ finally:
+ os.chdir(old_dir)
tarball = base_name + '.tar'
self.assert_(os.path.exists(tarball))