From: Kirill Podoprigora Date: Fri, 9 Feb 2024 16:59:41 +0000 (+0300) Subject: gh-115142: Skip test_optimizer if _testinternalcapi module is not available (GH-115175) X-Git-Tag: v3.13.0a4~106 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f8931adc597aa696a0f60439e8f9a9047d51ef1c;p=thirdparty%2FPython%2Fcpython.git gh-115142: Skip test_optimizer if _testinternalcapi module is not available (GH-115175) --- diff --git a/Lib/test/test_optimizer.py b/Lib/test/test_optimizer.py index b56bf3cfd956..c8554c40df4b 100644 --- a/Lib/test/test_optimizer.py +++ b/Lib/test/test_optimizer.py @@ -1,6 +1,9 @@ -import _testinternalcapi import unittest import types +from test.support import import_helper + + +_testinternalcapi = import_helper.import_module("_testinternalcapi") class TestRareEventCounters(unittest.TestCase):