MCPcopy
hub / github.com/python/mypy / test_debug_op

Method test_debug_op

mypyc/test/test_misc.py:12–22  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10
11class TestMisc(unittest.TestCase):
12 def test_debug_op(self) -> None:
13 block = BasicBlock()
14 builder = LowLevelIRBuilder(
15 errors=None, options=CompilerOptions(strict_traceback_checks=True)
16 )
17 builder.activate_block(block)
18 builder.debug_print("foo")
19
20 names = generate_names_for_ir([], [block])
21 code = format_blocks([block], names, {})
22 assert code[:-1] == ["L0:", " r0 = 'foo'", " CPyDebug_PrintObject(r0)"]

Callers

nothing calls this directly

Calls 7

activate_blockMethod · 0.95
debug_printMethod · 0.95
BasicBlockClass · 0.90
LowLevelIRBuilderClass · 0.90
CompilerOptionsClass · 0.90
generate_names_for_irFunction · 0.90
format_blocksFunction · 0.90

Tested by

no test coverage detected