gh-116303: Skip test module dependent tests if test modules are unavailable (#117341)

This commit is contained in:
Erlend E. Aasland 2024-04-03 15:11:36 +02:00 committed by GitHub
parent 2ec6bb4111
commit ea94b3b149
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 255 additions and 123 deletions

View file

@ -14,6 +14,7 @@ import random
from test import support
from test.support import script_helper, ALWAYS_EQ
from test.support import gc_collect
from test.support import import_helper
from test.support import threading_helper
# Used in ReferencesTestCase.test_ref_created_during_del() .
@ -161,7 +162,7 @@ class ReferencesTestCase(TestBase):
@support.cpython_only
def test_cfunction(self):
import _testcapi
_testcapi = import_helper.import_module("_testcapi")
create_cfunction = _testcapi.create_cfunction
f = create_cfunction()
wr = weakref.ref(f)