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

Method test_fields_dict

tests/test_make.py:1655–1663  ·  view source on GitHub ↗

Returns an ordered dict of ``{attribute_name: Attribute}``.

(self, C)

Source from the content-addressed store, hash-verified

1653
1654 @given(simple_classes())
1655 def test_fields_dict(self, C):
1656 """
1657 Returns an ordered dict of ``{attribute_name: Attribute}``.
1658 """
1659 d = fields_dict(C)
1660
1661 assert isinstance(d, dict)
1662 assert list(fields(C)) == list(d.values())
1663 assert [a.name for a in fields(C)] == list(d)
1664
1665
1666class TestConverter:

Callers

nothing calls this directly

Calls 2

fields_dictFunction · 0.90
fieldsFunction · 0.90

Tested by

no test coverage detected