We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06317c9 commit 1d21c95Copy full SHA for 1d21c95
testsuite/test_schema_resolver.py
@@ -2,7 +2,12 @@
2
import os
3
import pytest
4
from hepdata_validator.schema_resolver import JsonSchemaResolver
5
-from jsonschema.exceptions import RefResolutionError
+
6
+# This is compatible both with Python2 and Python3
7
+try:
8
+ FileNotFoundError
9
+except NameError: # pragma: no cover
10
+ FileNotFoundError = IOError # pragma: no cover
11
12
13
####################################################
@@ -71,5 +76,5 @@ def test_json_resolver_non_existing_schema(json_resolver):
71
76
72
77
file_name = "random_name.json"
73
78
74
- with pytest.raises(RefResolutionError):
79
+ with pytest.raises(FileNotFoundError):
75
80
json_resolver.resolve(file_name)
0 commit comments