From: Serhiy Storchaka Date: Tue, 8 Sep 2015 06:59:02 +0000 (+0300) Subject: Fixed tests for shutil.make_archive() with relative base_name in the case when X-Git-Tag: v3.5.1rc1~419^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5558d4f2f89b86bb0aab35fff01c2b51f1013f33;p=thirdparty%2FPython%2Fcpython.git Fixed tests for shutil.make_archive() with relative base_name in the case when the path of the directory for temporary files contains symlinks. --- diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 04738d365b06..5b4e7e76699a 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -971,9 +971,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 @@ -1061,9 +1061,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')