Skip to content

Commit

Permalink
pythongh-90473: Skip get_config_h() tests on WASI (pythonGH-93645)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiran authored Jun 9, 2022
1 parent 5a4af3a commit 6099611
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Lib/distutils/tests/test_sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from distutils import sysconfig
from distutils.ccompiler import get_default_compiler
from distutils.tests import support
from test.support import run_unittest, swap_item, requires_subprocess
from test.support import run_unittest, swap_item, requires_subprocess, is_wasi
from test.support.os_helper import TESTFN
from test.support.warnings_helper import check_warnings

Expand All @@ -32,6 +32,7 @@ def cleanup_testfn(self):
elif os.path.isdir(TESTFN):
shutil.rmtree(TESTFN)

@unittest.skipIf(is_wasi, "Incompatible with WASI mapdir and OOT builds")
def test_get_config_h_filename(self):
config_h = sysconfig.get_config_h_filename()
self.assertTrue(os.path.isfile(config_h), config_h)
Expand Down
6 changes: 5 additions & 1 deletion Lib/test/test_sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import shutil
from copy import copy

from test.support import (captured_stdout, PythonSymlink, requires_subprocess)
from test.support import (
captured_stdout, PythonSymlink, requires_subprocess, is_wasi
)
from test.support.import_helper import import_module
from test.support.os_helper import (TESTFN, unlink, skip_unless_symlink,
change_cwd)
Expand Down Expand Up @@ -328,6 +330,7 @@ def test_get_platform(self):

# XXX more platforms to tests here

@unittest.skipIf(is_wasi, "Incompatible with WASI mapdir and OOT builds")
def test_get_config_h_filename(self):
config_h = sysconfig.get_config_h_filename()
self.assertTrue(os.path.isfile(config_h), config_h)
Expand Down Expand Up @@ -499,6 +502,7 @@ class MakefileTests(unittest.TestCase):

@unittest.skipIf(sys.platform.startswith('win'),
'Test is not Windows compatible')
@unittest.skipIf(is_wasi, "Incompatible with WASI mapdir and OOT builds")
def test_get_makefile_filename(self):
makefile = sysconfig.get_makefile_filename()
self.assertTrue(os.path.isfile(makefile), makefile)
Expand Down

0 comments on commit 6099611

Please sign in to comment.