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

Method test_emit_inc_ref_instance

mypyc/test/test_emit.py:103–108  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

101 self.assert_output("CPy_INCREF(x);\n")
102
103 def test_emit_inc_ref_instance(self) -> None:
104 self.emitter.emit_inc_ref("x", self.instance_a)
105 if HAVE_IMMORTAL:
106 self.assert_output("CPy_INCREF_NO_IMM(x);\n")
107 else:
108 self.assert_output("CPy_INCREF(x);\n")
109
110 def test_emit_inc_ref_optional(self) -> None:
111 optional = RUnion([self.instance_a, none_rprimitive])

Callers

nothing calls this directly

Calls 2

assert_outputMethod · 0.95
emit_inc_refMethod · 0.45

Tested by

no test coverage detected