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

Method test_underscores

tests/test_dunders.py:927–938  ·  view source on GitHub ↗

The argument names in `__init__` are without leading and trailing underscores.

(self)

Source from the content-addressed store, hash-verified

925 i.b = "foo"
926
927 def test_underscores(self):
928 """
929 The argument names in `__init__` are without leading and trailing
930 underscores.
931 """
932
933 class C:
934 __attrs_attrs__ = [simple_attr("_private")]
935
936 C = _add_init(C, False)
937 i = C(private=42)
938 assert 42 == i._private
939
940
941class TestNothing:

Callers

nothing calls this directly

Calls 2

_add_initFunction · 0.85
CClass · 0.70

Tested by

no test coverage detected