Skip to content

Commit

Permalink
TST: catch ValidationError instead of TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
tangkong committed Feb 27, 2024
1 parent da8eca2 commit 0e8985b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superscore/tests/test_model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Any

import pytest
from apischema import ValidationError

from superscore.model import Root

Expand All @@ -27,9 +28,9 @@ def test_validate_failure(
sample_database.validate()
setattr(entry, replace_fld, replace_obj)

with pytest.raises(TypeError):
with pytest.raises(ValidationError):
sample_database.validate()
with pytest.raises(TypeError):
with pytest.raises(ValidationError):
entry.validate()


Expand Down

0 comments on commit 0e8985b

Please sign in to comment.