Issue #12765: Fix packaging.test.test_database failures on OS X due

to unwarranted assumption about absolute paths: on OS X /var is a
symlink to /private/var.  (Also true for /etc and /tmp).
This commit is contained in:
Ned Deily 2011-09-15 15:09:23 -07:00
parent 9561d7c526
commit e30186bf4b

View file

@ -50,6 +50,7 @@ class FakeDistsMixin:
tmpdir = tempfile.mkdtemp()
self.addCleanup(shutil.rmtree, tmpdir)
self.fake_dists_path = os.path.join(tmpdir, 'fake_dists')
self.fake_dists_path = os.path.realpath(self.fake_dists_path)
fake_dists_src = os.path.abspath(
os.path.join(os.path.dirname(__file__), 'fake_dists'))
shutil.copytree(fake_dists_src, self.fake_dists_path)