Mailing List Archive

gh-115142: Skip ``test_capi.test_dict.py`` if ``_testcapi`` and ``_testlimitedcapi`` are not available (GH-117588)
https://github.com/python/cpython/commit/dfcae4379f2cc4d352a180f9fef2381570aa9bcb
commit: dfcae4379f2cc4d352a180f9fef2381570aa9bcb
branch: main
author: Kirill Podoprigora <kirill.bast9@mail.ru>
committer: encukou <encukou@gmail.com>
date: 2024-04-10T16:32:57+02:00
summary:

gh-115142: Skip ``test_capi.test_dict.py`` if ``_testcapi`` and ``_testlimitedcapi`` are not available (GH-117588)

gh-115142: Skip test_dict if _testcapi and _testlimitedcapi is not available

files:
M Lib/test/test_capi/test_dict.py

diff --git a/Lib/test/test_capi/test_dict.py b/Lib/test/test_capi/test_dict.py
index bcc978d224a583..e726e3d813d888 100644
--- a/Lib/test/test_capi/test_dict.py
+++ b/Lib/test/test_capi/test_dict.py
@@ -2,8 +2,11 @@
from collections import OrderedDict, UserDict
from types import MappingProxyType
from test import support
-import _testcapi
-import _testlimitedcapi
+from test.support import import_helper
+
+
+_testcapi = import_helper.import_module("_testcapi")
+_testlimitedcapi = import_helper.import_module("_testlimitedcapi")


NULL = None

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-leave@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: list-python-checkins@lists.gossamer-threads.com