Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6c779ea

Browse files
committed
Issue #15364: Fix test_srcdir for the installed case.
1 parent 9e4bfb6 commit 6c779ea

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/distutils/tests/test_sysconfig.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ def test_srcdir(self):
6767
self.assertTrue(os.path.exists(Python_h), Python_h)
6868
self.assertTrue(sysconfig._is_python_source_dir(srcdir))
6969
elif os.name == 'posix':
70-
self.assertEqual(sysconfig.get_makefile_filename(), srcdir)
70+
self.assertEqual(os.path.dirname(sysconfig.get_makefile_filename()),
71+
srcdir)
7172

7273
def test_srcdir_independent_of_cwd(self):
7374
# srcdir should be independent of the current working directory

Lib/test/test_sysconfig.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ def test_srcdir(self):
354354
self.assertTrue(os.path.exists(Python_h), Python_h)
355355
self.assertTrue(sysconfig._is_python_source_dir(srcdir))
356356
elif os.name == 'posix':
357-
self.assertEqual(sysconfig.get_makefile_filename(), srcdir)
357+
self.assertEqual(os.path.dirname(sysconfig.get_makefile_filename()),
358+
srcdir)
358359

359360
def test_srcdir_independent_of_cwd(self):
360361
# srcdir should be independent of the current working directory

0 commit comments

Comments
 (0)