mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-116303: Skip test module dependent tests if test modules are unavailable (#117341)
This commit is contained in:
parent
2ec6bb4111
commit
ea94b3b149
57 changed files with 255 additions and 123 deletions
|
@ -57,8 +57,10 @@ try:
|
|||
except (ImportError, AttributeError):
|
||||
all_users = []
|
||||
try:
|
||||
import _testcapi
|
||||
from _testcapi import INT_MAX, PY_SSIZE_T_MAX
|
||||
except ImportError:
|
||||
_testcapi = None
|
||||
INT_MAX = PY_SSIZE_T_MAX = sys.maxsize
|
||||
|
||||
try:
|
||||
|
@ -5338,6 +5340,7 @@ class ForkTests(unittest.TestCase):
|
|||
|
||||
@unittest.skipUnless(sys.platform in ("linux", "android", "darwin"),
|
||||
"Only Linux and macOS detect this today.")
|
||||
@unittest.skipIf(_testcapi is None, "requires _testcapi")
|
||||
def test_fork_warns_when_non_python_thread_exists(self):
|
||||
code = """if 1:
|
||||
import os, threading, warnings
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue