MCPcopy
hub / github.com/python-attrs/attrs / test_repr_uninitialized_member

Method test_repr_uninitialized_member

tests/test_dunders.py:410–416  ·  view source on GitHub ↗

repr signals unset attributes

(self)

Source from the content-addressed store, hash-verified

408 assert "C(_x=42)" == repr(i)
409
410 def test_repr_uninitialized_member(self):
411 """
412 repr signals unset attributes
413 """
414 C = make_class("C", {"a": attr.ib(init=False)})
415
416 assert "C(a=NOTHING)" == repr(C())
417
418 @given(add_str=booleans(), slots=booleans())
419 def test_str(self, add_str, slots):

Callers

nothing calls this directly

Calls 2

make_classFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected