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

Method test_subclass

tests/test_validators.py:136–142  ·  view source on GitHub ↗

Subclasses are accepted too.

(self)

Source from the content-addressed store, hash-verified

134 v(None, simple_attr("test"), 42)
135
136 def test_subclass(self):
137 """
138 Subclasses are accepted too.
139 """
140 v = instance_of(int)
141 # yep, bools are a subclass of int :(
142 v(None, simple_attr("test"), True)
143
144 def test_fail(self):
145 """

Callers

nothing calls this directly

Calls 2

instance_ofFunction · 0.90
simple_attrFunction · 0.85

Tested by

no test coverage detected