MCPcopy Index your code
hub / github.com/python/cpython / check_stack_names

Method check_stack_names

Lib/test/test_generators.py:904–916  ·  view source on GitHub ↗
(self, frame, expected)

Source from the content-addressed store, hash-verified

902class GeneratorStackTraceTest(unittest.TestCase):
903
904 def check_stack_names(self, frame, expected):
905 names = []
906 while frame:
907 name = frame.f_code.co_name
908 # Stop checking frames when we get to our test helper.
909 if (name.startswith('check_') or name.startswith('call_')
910 or name.startswith('test')):
911 break
912
913 names.append(name)
914 frame = frame.f_back
915
916 self.assertEqual(names, expected)
917
918 def check_yield_from_example(self, call_method):
919 def f():

Callers 3

fMethod · 0.95
gMethod · 0.95
throwMethod · 0.80

Calls 3

startswithMethod · 0.45
appendMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected