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

Method test_fail

tests/test_converters.py:243–255  ·  view source on GitHub ↗

Fails if any wrapped converter fails.

(self)

Source from the content-addressed store, hash-verified

241 )
242
243 def test_fail(self):
244 """
245 Fails if any wrapped converter fails.
246 """
247 c = pipe(str, to_bool)
248
249 # First wrapped converter fails:
250 with pytest.raises(ValueError):
251 c(33)
252
253 # Last wrapped converter fails:
254 with pytest.raises(ValueError):
255 c("33")
256
257 def test_sugar(self):
258 """

Callers

nothing calls this directly

Calls 1

pipeFunction · 0.50

Tested by

no test coverage detected