summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Berman <Julian@GrayVines.com>2013-10-27 21:11:28 -0400
committerJulian Berman <Julian@GrayVines.com>2013-10-27 21:11:28 -0400
commit6b8e1f4bcc5ae851abea99441815382d43e2b243 (patch)
tree2b4be231ac2a6d10ece3145090f3dca90a417686
parentb805101de629f96fbbec455a1d20b46a1fdb9605 (diff)
downloadjsonschema-6b8e1f4bcc5ae851abea99441815382d43e2b243.tar.gz
Remove __eq__, since it causes hashability issues on Py3 that I don't want to deal with at the moment.
-rw-r--r--jsonschema/exceptions.py8
-rw-r--r--jsonschema/tests/test_exceptions.py3
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):