mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +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
|
@ -1,12 +1,17 @@
|
|||
from test.support import verbose, reap_children
|
||||
from test.support.os_helper import TESTFN, unlink
|
||||
import sys
|
||||
import unittest
|
||||
from test.support import (
|
||||
is_apple_mobile, is_emscripten, is_wasi, reap_children, verbose
|
||||
)
|
||||
from test.support.import_helper import import_module
|
||||
from test.support.os_helper import TESTFN, unlink
|
||||
|
||||
# Skip these tests if termios or fcntl are not available
|
||||
# Skip these tests if termios is not available
|
||||
import_module('termios')
|
||||
# fcntl is a proxy for not being one of the wasm32 platforms even though we
|
||||
# don't use this module... a proper check for what crashes those is needed.
|
||||
import_module("fcntl")
|
||||
|
||||
# Skip tests on WASM platforms, plus iOS/tvOS/watchOS
|
||||
if is_apple_mobile or is_emscripten or is_wasi:
|
||||
raise unittest.SkipTest(f"pty tests not required on {sys.platform}")
|
||||
|
||||
import errno
|
||||
import os
|
||||
|
@ -17,7 +22,6 @@ import select
|
|||
import signal
|
||||
import socket
|
||||
import io # readline
|
||||
import unittest
|
||||
import warnings
|
||||
|
||||
TEST_STRING_1 = b"I wish to buy a fish license.\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue