Skip to content

Commit

Permalink
Update JSON resolver tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinclert authored and GraemeWatt committed Oct 5, 2020
1 parent 06317c9 commit 1d21c95
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions testsuite/test_schema_resolver.py
Expand Up @@ -2,7 +2,12 @@
import os
import pytest
from hepdata_validator.schema_resolver import JsonSchemaResolver
from jsonschema.exceptions import RefResolutionError

# This is compatible both with Python2 and Python3
try:
FileNotFoundError
except NameError: # pragma: no cover
FileNotFoundError = IOError # pragma: no cover


####################################################
Expand Down Expand Up @@ -71,5 +76,5 @@ def test_json_resolver_non_existing_schema(json_resolver):

file_name = "random_name.json"

with pytest.raises(RefResolutionError):
with pytest.raises(FileNotFoundError):
json_resolver.resolve(file_name)

0 comments on commit 1d21c95

Please sign in to comment.