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

Method test_handler_non_attrs_instance

tests/test_make.py:1557–1565  ·  view source on GitHub ↗

Raises `TypeError` on non-*attrs* instances.

(self)

Source from the content-addressed store, hash-verified

1555 assert fields(C()) is fields(C)
1556
1557 def test_handler_non_attrs_instance(self):
1558 """
1559 Raises `TypeError` on non-*attrs* instances.
1560 """
1561 with pytest.raises(
1562 TypeError,
1563 match=r"Passed object must be a class or attrs instance\.",
1564 ):
1565 fields(object())
1566
1567 def test_handler_non_attrs_class(self):
1568 """

Callers

nothing calls this directly

Calls 1

fieldsFunction · 0.90

Tested by

no test coverage detected