I'm writing a unit test whereby I want to assert that the error I get:
<ValidationError: "'a list' is not of type 'array'">
is equal too
assert ValidationError(message="'a list' is not of type 'array'")
I'm using a simple assertion:
assert actual == expected
When I run pytest I get the following error:
assert <ValidationError: "'a list' is not of type 'array'"> == <ValidationError: "'a list' is not of type 'array'">
The validation error comes from jsonschema
from jsonschema import ValidationError
Even though they are identical, the assertion still fails. Does anyone know why?