MCPcopy Index your code
hub / github.com/python/mypy / test_assign

Method test_assign

mypyc/test/test_pprint.py:36–42  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

34 assert generate_names_for_ir([], [block]) == {op1: "r0", op2: "r1"}
35
36 def test_assign(self) -> None:
37 reg = register("foo")
38 n = Integer(2)
39 op1 = Assign(reg, n)
40 op2 = Assign(reg, n)
41 block = make_block([op1, op2])
42 assert generate_names_for_ir([reg], [block]) == {reg: "foo"}

Callers

nothing calls this directly

Calls 5

IntegerClass · 0.90
AssignClass · 0.90
generate_names_for_irFunction · 0.90
make_blockFunction · 0.85
registerFunction · 0.70

Tested by

no test coverage detected