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

Method test_handler_non_attrs_instance

tests/test_make.py:1557–1565  ·  tests/test_make.py::TestFields.test_handler_non_attrs_instance

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 class="st">"""
1559 Raises `TypeError` on non-*attrs* instances.
1560 class="st">"""
1561 with pytest.raises(
1562 TypeError,
1563 match=rclass="st">"Passed object must be a class or attrs instance\.",
1564 ):
1565 fields(object())
1566
1567 def test_handler_non_attrs_class(self):
1568 class="st">"""

Callers

nothing calls this directly

Calls 1

fieldsFunction · 0.90

Tested by

no test coverage detected