diff options
-rw-r--r-- | jsonschema/exceptions.py | 8 | ||||
-rw-r--r-- | jsonschema/tests/test_exceptions.py | 3 |
2 files changed, 2 insertions, 9 deletions
diff --git a/jsonschema/exceptions.py b/jsonschema/exceptions.py index 04a3c0b..26fafbe 100644 --- a/jsonschema/exceptions.py +++ b/jsonschema/exceptions.py @@ -28,14 +28,6 @@ class _Error(Exception): self.instance = instance self.schema = schema - def __eq__(self, other): - if not isinstance(other, self.__class__): - return NotImplemented - return self._contents() == other._contents() - - def __ne__(self, other): - return not self == other - def __repr__(self): return "<%s: %r>" % (self.__class__.__name__, self.message) diff --git a/jsonschema/tests/test_exceptions.py b/jsonschema/tests/test_exceptions.py index b3f176d..2014a64 100644 --- a/jsonschema/tests/test_exceptions.py +++ b/jsonschema/tests/test_exceptions.py @@ -149,7 +149,8 @@ class TestBestMatch(unittest.TestCase): validator = Draft4Validator({"minProperties" : 2}) error, = validator.iter_errors({}) self.assertEqual( - exceptions.best_match(validator.iter_errors({})), error, + exceptions.best_match(validator.iter_errors({})).validator, + "minProperties", ) def test_no_errors(self): |