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

Method check_body

Lib/test/test_symtable.py:402–407  ·  view source on GitHub ↗
(body, expected_methods)

Source from the content-addressed store, hash-verified

400 # expressions do not have the TYPE_FUNCTION type.
401
402 def check_body(body, expected_methods):
403 indented = textwrap.indent(body, ' ' * 4)
404 top = symtable.symtable(f"class A:\n{indented}", "?", "exec")
405 this = find_block(top, "A")
406 with self.assertWarnsRegex(DeprecationWarning, deprecation_mess):
407 self.assertEqual(this.get_methods(), expected_methods)
408
409 # statements with 'genexpr' inside it
410 GENEXPRS = (

Callers

nothing calls this directly

Calls 5

find_blockFunction · 0.85
assertWarnsRegexMethod · 0.80
indentMethod · 0.45
assertEqualMethod · 0.45
get_methodsMethod · 0.45

Tested by

no test coverage detected