mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-114099: Add test exclusions to support running the test suite on iOS (#114889)
Add test annotations required to run the test suite on iOS (PEP 730). The majority of the change involve annotating tests that use subprocess, but are skipped on Emscripten/WASI for other reasons, and including iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks. `is_apple` and `is_apple_mobile` test helpers have been added to identify *any* Apple platform, and "any Apple platform except macOS", respectively.
This commit is contained in:
parent
15f6f048a6
commit
391659b3da
31 changed files with 224 additions and 150 deletions
|
@ -19,8 +19,8 @@ import sysconfig
|
|||
import tempfile
|
||||
from test.support import (captured_stdout, captured_stderr,
|
||||
skip_if_broken_multiprocessing_synchronize, verbose,
|
||||
requires_subprocess, is_emscripten, is_wasi,
|
||||
requires_venv_with_pip, TEST_HOME_DIR,
|
||||
requires_subprocess, is_apple_mobile, is_emscripten,
|
||||
is_wasi, requires_venv_with_pip, TEST_HOME_DIR,
|
||||
requires_resource, copy_python_src_ignore)
|
||||
from test.support.os_helper import (can_symlink, EnvironmentVarGuard, rmtree)
|
||||
import unittest
|
||||
|
@ -39,8 +39,10 @@ requireVenvCreate = unittest.skipUnless(
|
|||
or sys._base_executable != sys.executable,
|
||||
'cannot run venv.create from within a venv on this platform')
|
||||
|
||||
if is_emscripten or is_wasi:
|
||||
raise unittest.SkipTest("venv is not available on Emscripten/WASI.")
|
||||
# Skip tests on WASM platforms, plus iOS/tvOS/watchOS
|
||||
if is_apple_mobile or is_emscripten or is_wasi:
|
||||
raise unittest.SkipTest(f"venv tests not required on {sys.platform}")
|
||||
|
||||
|
||||
@requires_subprocess()
|
||||
def check_output(cmd, encoding=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue