Skip to content

Commit

Permalink
updating comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle committed Nov 21, 2023
1 parent 7e2d37b commit b9d6c8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/validators/test_union.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit b9d6c8a

Please sign in to comment.