summaryrefslogtreecommitdiff
path: root/jsonschema/tests
diff options
context:
space:
mode:
Diffstat (limited to 'jsonschema/tests')
-rw-r--r--jsonschema/tests/_suite.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/jsonschema/tests/_suite.py b/jsonschema/tests/_suite.py
index 06fbd11..cdb4b1e 100644
--- a/jsonschema/tests/_suite.py
+++ b/jsonschema/tests/_suite.py
@@ -55,7 +55,7 @@ class Suite(object):
return pvector(self.version(name=name) for name in validators)
def version(self, name):
- return _Version(
+ return Version(
name=name,
path=self._root.descendant(["tests", name]),
validator=validators[name],
@@ -64,7 +64,7 @@ class Suite(object):
@attr.s(hash=True)
-class _Version(object):
+class Version(object):
_path = attr.ib()
_remotes = attr.ib()
@@ -168,6 +168,12 @@ class _Test(object):
**self._validate_kwargs
)
+ def validate_ignoring_errors(self):
+ try:
+ self.validate()
+ except jsonschema.ValidationError:
+ pass
+
def with_validate_kwargs(self, **kwargs):
validate_kwargs = self._validate_kwargs.update(kwargs)
return attr.evolve(self, validate_kwargs=validate_kwargs)