From 099e5a798de9192116382c466f019afb8007f880 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Thu, 8 Feb 2024 20:51:07 +0200 Subject: [PATCH] gh-115142: Skip tests if _testinternalcapi is not available --- 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 b56bf3cfd9560e..c8554c40df4b2d 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):