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

Method test_subclass

tests/test_validators.py:1110–1116  ·  view source on GitHub ↗

Subclasses are accepted too.

(self)

Source from the content-addressed store, hash-verified

1108 v(None, simple_attr("test"), int)
1109
1110 def test_subclass(self):
1111 """
1112 Subclasses are accepted too.
1113 """
1114 v = _subclass_of(int)
1115 # yep, bools are a subclass of int :(
1116 v(None, simple_attr("test"), bool)
1117
1118 def test_fail(self):
1119 """

Callers

nothing calls this directly

Calls 2

_subclass_ofFunction · 0.90
simple_attrFunction · 0.85

Tested by

no test coverage detected