import types
import textwrap
import warnings
-import _testinternalcapi
+try:
+ import _testinternalcapi
+except ImportError:
+ _testinternalcapi = None
from test import support
from test.support import (script_helper, requires_debug_ranges, run_code,
"""
self.check_stack_size(snippet, async_=True)
+@support.cpython_only
+@unittest.skipIf(_testinternalcapi is None, 'need _testinternalcapi module')
class TestInstructionSequence(unittest.TestCase):
def compare_instructions(self, seq, expected):
self.assertEqual([(opcode.opname[i[0]],) + i[1:] for i in seq.get_instructions()],