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

Method test_instance

tests/test_make.py:1551–1555  ·  tests/test_make.py::TestFields.test_instance

Returns the class fields for *attrs* instances too.

(self, C)

Source from the content-addressed store, hash-verified

1549
1550 @given(simple_classes())
1551 def test_instance(self, C):
1552 class="st">"""
1553 Returns the class fields for *attrs* instances too.
1554 class="st">"""
1555 assert fields(C()) is fields(C)
1556
1557 def test_handler_non_attrs_instance(self):
1558 class="st">"""

Callers

nothing calls this directly

Calls 2

fieldsFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected