MCPcopy Create free account
hub / github.com/python/mypy / test_emit_dec_ref_list

Method test_emit_dec_ref_list

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

Source from the content-addressed store, hash-verified

131 self.assert_output("CPyTagged_DecRef(x);\n")
132
133 def test_emit_dec_ref_list(self) -> None:
134 self.emitter.emit_dec_ref("x", list_rprimitive)
135 if HAVE_IMMORTAL:
136 self.assert_output("CPy_DECREF_NO_IMM(x);\n")
137 else:
138 self.assert_output("CPy_DECREF(x);\n")
139 self.emitter.emit_dec_ref("x", list_rprimitive, is_xdec=True)
140 if HAVE_IMMORTAL:
141 self.assert_output("CPy_XDECREF_NO_IMM(x);\n")
142 else:
143 self.assert_output("CPy_XDECREF(x);\n")
144
145 def test_emit_dec_ref_instance(self) -> None:
146 self.emitter.emit_dec_ref("x", self.instance_a)

Callers

nothing calls this directly

Calls 2

assert_outputMethod · 0.95
emit_dec_refMethod · 0.45

Tested by

no test coverage detected