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

Method test_set_attr_no_error

mypyc/test/test_emitfunc.py:549–559  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

547 )
548
549 def test_set_attr_no_error(self) -> None:
550 op = SetAttr(self.r, "y", self.m, 1)
551 op.error_kind = ERR_NEVER
552 self.assert_emit(
553 op,
554 """if (((mod___AObject *)cpy_r_r)->_y != CPY_INT_TAG) {
555 CPyTagged_DECREF(((mod___AObject *)cpy_r_r)->_y);
556 }
557 ((mod___AObject *)cpy_r_r)->_y = cpy_r_m;
558 """,
559 )
560
561 def test_set_attr_non_refcounted_no_error(self) -> None:
562 op = SetAttr(self.r, "x", self.b, 1)

Callers

nothing calls this directly

Calls 2

assert_emitMethod · 0.95
SetAttrClass · 0.90

Tested by

no test coverage detected