diff --git a/tests/validators/test_union.py b/tests/validators/test_union.py index fe9914110..3a1884f3f 100644 --- a/tests/validators/test_union.py +++ b/tests/validators/test_union.py @@ -797,6 +797,7 @@ class ModelA: } ) - # should raise ValidationError for Literal check, not TypeError + # validation against Literal[True] fails bc of the unhashable dict + # A ValidationError is raised, not a ValueError, which allows the validation against the union to continue assert validator.validate_python({'a': 42}) assert validator.validate_python(True)