From f8931adc597aa696a0f60439e8f9a9047d51ef1c Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Fri, 9 Feb 2024 19:59:41 +0300 Subject: gh-115142: Skip test_optimizer if _testinternalcapi module is not available (GH-115175) --- Lib/test/test_optimizer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_optimizer.py b/Lib/test/test_optimizer.py index b56bf3c..c8554c4 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): -- cgit v0.12