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

Method test_success

tests/test_validators.py:669–677  ·  view source on GitHub ↗

If both the key and value validators succeed, nothing happens.

(self)

Source from the content-addressed store, hash-verified

667 assert deep_mapping.__name__ in validator_module.__all__
668
669 def test_success(self):
670 """
671 If both the key and value validators succeed, nothing happens.
672 """
673 key_validator = instance_of(str)
674 value_validator = instance_of(int)
675 v = deep_mapping(key_validator, value_validator)
676 a = simple_attr("test")
677 v(None, a, {"a": 6, "b": 7})
678
679 @pytest.mark.parametrize(
680 ("key_validator", "value_validator", "mapping_validator"),

Callers

nothing calls this directly

Calls 3

instance_ofFunction · 0.90
deep_mappingFunction · 0.90
simple_attrFunction · 0.85

Tested by

no test coverage detected