summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_shutil.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-09-08 07:00:22 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-09-08 07:00:22 (GMT)
commit050a143a3f171191a19fee44854ee3a15838eb68 (patch)
tree02222ec59699cd9f065480e61aeb8765f6ad09f8 /Lib/test/test_shutil.py
parent875ef4c70a51a36c6b0a3eefe1dfa2ccd49bbf08 (diff)
parent5558d4f2f89b86bb0aab35fff01c2b51f1013f33 (diff)
downloadcpython-050a143a3f171191a19fee44854ee3a15838eb68.zip
cpython-050a143a3f171191a19fee44854ee3a15838eb68.tar.gz
cpython-050a143a3f171191a19fee44854ee3a15838eb68.tar.bz2
Fixed tests for shutil.make_archive() with relative base_name in the case when
the path of the directory for temporary files contains symlinks.
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r--Lib/test/test_shutil.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index bb073c9..522959a 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -977,9 +977,9 @@ class TestShutil(unittest.TestCase):
# working with relative paths
work_dir = os.path.dirname(tmpdir2)
rel_base_name = os.path.join(os.path.basename(tmpdir2), 'archive')
- base_name = os.path.join(work_dir, rel_base_name)
with support.change_cwd(work_dir):
+ base_name = os.path.abspath(rel_base_name)
tarball = make_archive(rel_base_name, 'gztar', root_dir, '.')
# check if the compressed tarball was created
@@ -1067,9 +1067,9 @@ class TestShutil(unittest.TestCase):
# working with relative paths
work_dir = os.path.dirname(tmpdir2)
rel_base_name = os.path.join(os.path.basename(tmpdir2), 'archive')
- base_name = os.path.join(work_dir, rel_base_name)
with support.change_cwd(work_dir):
+ base_name = os.path.abspath(rel_base_name)
res = make_archive(rel_base_name, 'zip', root_dir, base_dir)
self.assertEqual(res, base_name + '.zip')