import textwrap import unittest from test import support from .util import setup_module, DebuggerTests def setUpModule(): setup_module() @unittest.skipIf(support.python_is_optimized(), "Python was compiled with optimizations") @support.requires_resource('cpu') class CFunctionTests(DebuggerTests): def check(self, func_name, cmd): # Verify with "py-bt": gdb_output = self.get_stack_trace( cmd, breakpoint=func_name, cmds_after_breakpoint=['bt', 'py-bt'], # bpo-45207: Ignore 'Function "meth_varargs" not # defined.' message in stderr. ignore_stderr=True, ) self.assertIn(f'