Skip to content

Commit 099e5a7

Browse files
committed
pythongh-115142: Skip tests if _testinternalcapi is not available
1 parent fedbf77 commit 099e5a7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_optimizer.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
import _testinternalcapi
21
import unittest
32
import types
3+
from test.support import import_helper
4+
5+
6+
_testinternalcapi = import_helper.import_module("_testinternalcapi")
47

58

69
class TestRareEventCounters(unittest.TestCase):

0 commit comments

Comments
 (0)