Skip to content

Commit

Permalink
Refactor jsonschema exceptions to ASDF exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ketozhang committed Apr 4, 2024
1 parent e593ac2 commit a07c62c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/schema_validation_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from tempfile import NamedTemporaryFile

import asdf
import jsonschema
import pydantic
import pytest
import yaml
Expand Down Expand Up @@ -117,7 +116,7 @@ def test_validate_fail_on_bad_yaml_file():
# HACK: It is better that the ASDF's schema validation fails before
# the pydantic's. However, it seems ASDF deserialize first then do their
# validation.
with pytest.raises((jsonschema.ValidationError, pydantic.ValidationError)):
with pytest.raises((asdf.exceptions.ValidationError, pydantic.ValidationError)):
asdf.open(tempfile.name)


Expand Down

0 comments on commit a07c62c

Please sign in to comment.