Skip to content

Commit dbe0ddd

Browse files
committed
Fix test_sysconfig.py
1 parent 6585ab1 commit dbe0ddd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Lib/test/test_sysconfig.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,10 @@ def test_srcdir(self):
472472
# should be a full source checkout.
473473
Python_h = os.path.join(srcdir, 'Include', 'Python.h')
474474
self.assertTrue(os.path.exists(Python_h), Python_h)
475-
# <srcdir>/PC/pyconfig.h always exists even if unused on POSIX.
476-
pyconfig_h = os.path.join(srcdir, 'PC', 'pyconfig.h')
477-
self.assertTrue(os.path.exists(pyconfig_h), pyconfig_h)
475+
if os.name == 'nt':
476+
# <srcdir>/PC/pyconfig.h only exists on Windows.
477+
pyconfig_h = os.path.join(srcdir, 'PC', 'pyconfig.h')
478+
self.assertTrue(os.path.exists(pyconfig_h), pyconfig_h)
478479
pyconfig_h_in = os.path.join(srcdir, 'pyconfig.h.in')
479480
self.assertTrue(os.path.exists(pyconfig_h_in), pyconfig_h_in)
480481
elif os.name == 'posix':

0 commit comments

Comments
 (0)