MCPcopy Index your code
hub / github.com/RustPython/RustPython / check_body

Method check_body

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

Source from the content-addressed store, hash-verified

412 # expressions do not have the TYPE_FUNCTION type.
413
414 def check_body(body, expected_methods):
415 indented = textwrap.indent(body, ' ' * 4)
416 top = symtable.symtable(f"class A:\n{indented}", "?", "exec")
417 this = find_block(top, "A")
418 with self.assertWarnsRegex(DeprecationWarning, deprecation_mess):
419 self.assertEqual(this.get_methods(), expected_methods)
420
421 # statements with 'genexpr' inside it
422 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