mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -1742,6 +1742,10 @@ class ArgsTestCase(BaseTestCase):
|
|||
|
||||
@support.cpython_only
|
||||
def test_uncollectable(self):
|
||||
try:
|
||||
import _testcapi
|
||||
except ImportError:
|
||||
raise unittest.SkipTest("requires _testcapi")
|
||||
code = textwrap.dedent(r"""
|
||||
import _testcapi
|
||||
import gc
|
||||
|
@ -2124,6 +2128,10 @@ class ArgsTestCase(BaseTestCase):
|
|||
|
||||
def check_add_python_opts(self, option):
|
||||
# --fast-ci and --slow-ci add "-u -W default -bb -E" options to Python
|
||||
try:
|
||||
import _testinternalcapi
|
||||
except ImportError:
|
||||
raise unittest.SkipTest("requires _testinternalcapi")
|
||||
code = textwrap.dedent(r"""
|
||||
import sys
|
||||
import unittest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue