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 a8248a2 commit 41b49c6Copy full SHA for 41b49c6
jsonschema/tests/test_exceptions.py
@@ -8,8 +8,12 @@
8
class TestBestMatch(TestCase):
9
def best_match_of(self, instance, schema):
10
errors = list(_LATEST_VERSION(schema).iter_errors(instance))
11
+ msg = f"No errors found for {instance} under {schema!r}!"
12
+ self.assertTrue(errors, msg=msg)
13
+
14
best = exceptions.best_match(iter(errors))
15
reversed_best = exceptions.best_match(reversed(errors))
16
17
self.assertEqual(
18
best._contents(),
19
reversed_best._contents(),
0 commit comments