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

Method test_handler_non_attrs_class

tests/test_make.py:1567–1576  ·  tests/test_make.py::TestFields.test_handler_non_attrs_class

Raises `ValueError` if passed a non-*attrs* instance.

(self)

Source from the content-addressed store, hash-verified

1565 fields(object())
1566
1567 def test_handler_non_attrs_class(self):
1568 class="st">"""
1569 Raises `ValueError` if passed a non-*attrs* instance.
1570 class="st">"""
1571 with pytest.raises(NotAnAttrsClassError) as e:
1572 fields(object)
1573
1574 assert (
1575 fclass="st">"{object!r} is not an attrs-decorated class."
1576 ) == e.value.args[0]
1577
1578 def test_handler_non_attrs_generic_class(self):
1579 class="st">"""

Callers

nothing calls this directly

Calls 1

fieldsFunction · 0.90

Tested by

no test coverage detected