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

Method test_optional

tests/test_converters.py:303–309  ·  view source on GitHub ↗

Nothing happens if None.

(self)

Source from the content-addressed store, hash-verified

301
302class TestOptionalPipe:
303 def test_optional(self):
304 """
305 Nothing happens if None.
306 """
307 c = optional(pipe(str, Converter(to_bool), bool))
308
309 assert None is c.converter(None, None, None)
310
311 def test_pipe(self):
312 """

Callers

nothing calls this directly

Calls 3

optionalFunction · 0.90
ConverterClass · 0.90
pipeFunction · 0.50

Tested by

no test coverage detected