diff options
author | Christian Heimes <christian@python.org> | 2022-01-25 07:09:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-25 07:09:06 (GMT) |
commit | 8464fbc42ecc9ce504faac499711dcdc6eedef16 (patch) | |
tree | 1992e76c83da4720bc1dbc95901a417e0a4781e3 /Lib/distutils | |
parent | e1abffca45b60729c460e3e2ad50c8c1946cfd4e (diff) | |
download | cpython-8464fbc42ecc9ce504faac499711dcdc6eedef16.zip cpython-8464fbc42ecc9ce504faac499711dcdc6eedef16.tar.gz cpython-8464fbc42ecc9ce504faac499711dcdc6eedef16.tar.bz2 |
bpo-40280: Skip subprocess-based tests on wasm32-emscripten (GH-30615)
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/tests/test_build_clib.py | 5 | ||||
-rw-r--r-- | Lib/distutils/tests/test_build_ext.py | 2 | ||||
-rw-r--r-- | Lib/distutils/tests/test_build_py.py | 4 | ||||
-rw-r--r-- | Lib/distutils/tests/test_config_cmd.py | 5 | ||||
-rw-r--r-- | Lib/distutils/tests/test_install.py | 3 | ||||
-rw-r--r-- | Lib/distutils/tests/test_install_lib.py | 4 | ||||
-rw-r--r-- | Lib/distutils/tests/test_spawn.py | 4 | ||||
-rw-r--r-- | Lib/distutils/tests/test_sysconfig.py | 3 |
8 files changed, 23 insertions, 7 deletions
diff --git a/Lib/distutils/tests/test_build_clib.py b/Lib/distutils/tests/test_build_clib.py index 601a1b1..95f9282 100644 --- a/Lib/distutils/tests/test_build_clib.py +++ b/Lib/distutils/tests/test_build_clib.py @@ -4,7 +4,9 @@ import os import sys import sysconfig -from test.support import run_unittest, missing_compiler_executable +from test.support import ( + run_unittest, missing_compiler_executable, requires_subprocess +) from distutils.command.build_clib import build_clib from distutils.errors import DistutilsSetupError @@ -112,6 +114,7 @@ class BuildCLibTestCase(support.TempdirManager, self.assertRaises(DistutilsSetupError, cmd.finalize_options) @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") + @requires_subprocess() def test_run(self): pkg_dir, dist = self.create_dist() cmd = build_clib(dist) diff --git a/Lib/distutils/tests/test_build_ext.py b/Lib/distutils/tests/test_build_ext.py index 3ee567d..460b62f 100644 --- a/Lib/distutils/tests/test_build_ext.py +++ b/Lib/distutils/tests/test_build_ext.py @@ -56,6 +56,7 @@ class BuildExtTestCase(TempdirManager, def build_ext(self, *args, **kwargs): return build_ext(*args, **kwargs) + @support.requires_subprocess() def test_build_ext(self): cmd = support.missing_compiler_executable() if cmd is not None: @@ -332,6 +333,7 @@ class BuildExtTestCase(TempdirManager, cmd.run() self.assertEqual(cmd.compiler, 'unix') + @support.requires_subprocess() def test_get_outputs(self): cmd = support.missing_compiler_executable() if cmd is not None: diff --git a/Lib/distutils/tests/test_build_py.py b/Lib/distutils/tests/test_build_py.py index a590a48..44a06cc 100644 --- a/Lib/distutils/tests/test_build_py.py +++ b/Lib/distutils/tests/test_build_py.py @@ -9,7 +9,7 @@ from distutils.core import Distribution from distutils.errors import DistutilsFileError from distutils.tests import support -from test.support import run_unittest +from test.support import run_unittest, requires_subprocess class BuildPyTestCase(support.TempdirManager, @@ -89,6 +89,7 @@ class BuildPyTestCase(support.TempdirManager, self.fail("failed package_data test when package_dir is ''") @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile disabled') + @requires_subprocess() def test_byte_compile(self): project_dir, dist = self.create_dist(py_modules=['boiledeggs']) os.chdir(project_dir) @@ -106,6 +107,7 @@ class BuildPyTestCase(support.TempdirManager, ['boiledeggs.%s.pyc' % sys.implementation.cache_tag]) @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile disabled') + @requires_subprocess() def test_byte_compile_optimized(self): project_dir, dist = self.create_dist(py_modules=['boiledeggs']) os.chdir(project_dir) diff --git a/Lib/distutils/tests/test_config_cmd.py b/Lib/distutils/tests/test_config_cmd.py index 072f9eb..c79db68 100644 --- a/Lib/distutils/tests/test_config_cmd.py +++ b/Lib/distutils/tests/test_config_cmd.py @@ -3,7 +3,9 @@ import unittest import os import sys import sysconfig -from test.support import run_unittest, missing_compiler_executable +from test.support import ( + run_unittest, missing_compiler_executable, requires_subprocess +) from distutils.command.config import dump_file, config from distutils.tests import support @@ -42,6 +44,7 @@ class ConfigTestCase(support.LoggingSilencer, self.assertEqual(len(self._logs), numlines+1) @unittest.skipIf(sys.platform == 'win32', "can't test on Windows") + @requires_subprocess() def test_search_cpp(self): cmd = missing_compiler_executable(['preprocessor']) if cmd is not None: diff --git a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py index b2a3887..c38f98b 100644 --- a/Lib/distutils/tests/test_install.py +++ b/Lib/distutils/tests/test_install.py @@ -5,7 +5,7 @@ import sys import unittest import site -from test.support import captured_stdout, run_unittest +from test.support import captured_stdout, run_unittest, requires_subprocess from distutils import sysconfig from distutils.command.install import install, HAS_USER_SITE @@ -208,6 +208,7 @@ class InstallTestCase(support.TempdirManager, 'UNKNOWN-0.0.0-py%s.%s.egg-info' % sys.version_info[:2]] self.assertEqual(found, expected) + @requires_subprocess() def test_record_extensions(self): cmd = test_support.missing_compiler_executable() if cmd is not None: diff --git a/Lib/distutils/tests/test_install_lib.py b/Lib/distutils/tests/test_install_lib.py index 652653f..f840d1a 100644 --- a/Lib/distutils/tests/test_install_lib.py +++ b/Lib/distutils/tests/test_install_lib.py @@ -8,7 +8,7 @@ from distutils.command.install_lib import install_lib from distutils.extension import Extension from distutils.tests import support from distutils.errors import DistutilsOptionError -from test.support import run_unittest +from test.support import run_unittest, requires_subprocess class InstallLibTestCase(support.TempdirManager, @@ -35,6 +35,7 @@ class InstallLibTestCase(support.TempdirManager, self.assertEqual(cmd.optimize, 2) @unittest.skipIf(sys.dont_write_bytecode, 'byte-compile disabled') + @requires_subprocess() def test_byte_compile(self): project_dir, dist = self.create_dist() os.chdir(project_dir) @@ -90,6 +91,7 @@ class InstallLibTestCase(support.TempdirManager, inputs = cmd.get_inputs() self.assertEqual(len(inputs), 2, inputs) + @requires_subprocess() def test_dont_write_bytecode(self): # makes sure byte_compile is not used dist = self.create_dist()[1] diff --git a/Lib/distutils/tests/test_spawn.py b/Lib/distutils/tests/test_spawn.py index 631d645..a0a1145 100644 --- a/Lib/distutils/tests/test_spawn.py +++ b/Lib/distutils/tests/test_spawn.py @@ -3,7 +3,7 @@ import os import stat import sys import unittest.mock -from test.support import run_unittest, unix_shell +from test.support import run_unittest, unix_shell, requires_subprocess from test.support import os_helper from distutils.spawn import find_executable @@ -11,6 +11,8 @@ from distutils.spawn import spawn from distutils.errors import DistutilsExecError from distutils.tests import support + +@requires_subprocess() class SpawnTestCase(support.TempdirManager, support.LoggingSilencer, unittest.TestCase): diff --git a/Lib/distutils/tests/test_sysconfig.py b/Lib/distutils/tests/test_sysconfig.py index 3697206..7a88c88 100644 --- a/Lib/distutils/tests/test_sysconfig.py +++ b/Lib/distutils/tests/test_sysconfig.py @@ -10,7 +10,7 @@ import unittest from distutils import sysconfig from distutils.ccompiler import get_default_compiler from distutils.tests import support -from test.support import run_unittest, swap_item +from test.support import run_unittest, swap_item, requires_subprocess from test.support.os_helper import TESTFN from test.support.warnings_helper import check_warnings @@ -247,6 +247,7 @@ class SysconfigTestCase(support.EnvironGuard, unittest.TestCase): self.assertIsNotNone(vars['SO']) self.assertEqual(vars['SO'], vars['EXT_SUFFIX']) + @requires_subprocess() def test_customize_compiler_before_get_config_vars(self): # Issue #21923: test that a Distribution compiler # instance can be called without an explicit call to |