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

Method test_instance

tests/test_make.py:1634–1641  ·  view source on GitHub ↗

Raises `TypeError` on non-classes.

(self, C)

Source from the content-addressed store, hash-verified

1632
1633 @given(simple_classes())
1634 def test_instance(self, C):
1635 """
1636 Raises `TypeError` on non-classes.
1637 """
1638 with pytest.raises(TypeError) as e:
1639 fields_dict(C())
1640
1641 assert "Passed object must be a class." == e.value.args[0]
1642
1643 def test_handler_non_attrs_class(self):
1644 """

Callers

nothing calls this directly

Calls 2

fields_dictFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected