diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-10-23 17:08:07 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-10-23 17:08:07 (GMT) |
commit | 3d3e1ba8ac9d759394a76a3da4c47247b3120be3 (patch) | |
tree | 96a519022caa66789c69a40f83a1ad188e027caf /Lib/test/test_sysconfig.py | |
parent | 3dd263faabfd2b7cee9befa062f5e84827360643 (diff) | |
parent | dde25c485158b652ed34581cb977eb5bd439ade0 (diff) | |
download | cpython-3d3e1ba8ac9d759394a76a3da4c47247b3120be3.zip cpython-3d3e1ba8ac9d759394a76a3da4c47247b3120be3.tar.gz cpython-3d3e1ba8ac9d759394a76a3da4c47247b3120be3.tar.bz2 |
Issue #19340: Fix test_sysconfig when Python is built with an empty prefix.
Patch by Sunny K.
Diffstat (limited to 'Lib/test/test_sysconfig.py')
-rw-r--r-- | Lib/test/test_sysconfig.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index 5293649..2968604 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -352,8 +352,10 @@ class TestSysConfig(unittest.TestCase): self.assertTrue(os.path.exists(Python_h), Python_h) self.assertTrue(sysconfig._is_python_source_dir(srcdir)) elif os.name == 'posix': - self.assertEqual(os.path.dirname(sysconfig.get_makefile_filename()), - srcdir) + makefile_dir = os.path.dirname(sysconfig.get_makefile_filename()) + # Issue #19340: srcdir has been realpath'ed already + makefile_dir = os.path.realpath(makefile_dir) + self.assertEqual(makefile_dir, srcdir) def test_srcdir_independent_of_cwd(self): # srcdir should be independent of the current working directory |