Skip to content

Commit 45d59ba

Browse files
committed
gh-110529: Guard _testcapi imports in tests
1 parent 7e30821 commit 45d59ba

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Lib/test/test_capi/test_abstract.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import unittest
22
from collections import OrderedDict
3-
import _testcapi
3+
from test.support import import_helper
4+
5+
_testcapi = import_helper.import_module('_testcapi')
46

57

68
NULL = None

Lib/test/test_capi/test_dict.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import unittest
22
from collections import OrderedDict, UserDict
33
from types import MappingProxyType
4-
import _testcapi
4+
from test.support import import_helper
5+
6+
_testcapi = import_helper.import_module('_testcapi')
57

68

79
NULL = None

0 commit comments

Comments
 (0)