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

Method test_converter_instance

tests/test_converters.py:165–171  ·  view source on GitHub ↗

Works when passed a Converter instance as argument.

(self)

Source from the content-addressed store, hash-verified

163 c("not_an_int")
164
165 def test_converter_instance(self):
166 """
167 Works when passed a Converter instance as argument.
168 """
169 c = optional(Converter(to_bool))
170
171 assert True is c("yes", None, None)
172
173
174class TestDefaultIfNone:

Callers

nothing calls this directly

Calls 2

optionalFunction · 0.90
ConverterClass · 0.90

Tested by

no test coverage detected