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

Method test_success

tests/test_validators.py:342–347  ·  tests/test_validators.py::TestOptional.test_success

Nothing happens if validator succeeds.

(self, validator)

Source from the content-addressed store, hash-verified

340 assert optional.__name__ in validator_module.__all__
341
342 def test_success(self, validator):
343 class="st">"""
344 Nothing happens if validator succeeds.
345 class="st">"""
346 v = optional(validator)
347 v(None, simple_attr(class="st">"test"), 42)
348
349 def test_success_with_none(self, validator):
350 class="st">"""

Callers

nothing calls this directly

Calls 2

optionalFunction · 0.90
simple_attrFunction · 0.85

Tested by

no test coverage detected