diff options
author | Julian Berman <Julian@GrayVines.com> | 2017-10-23 02:00:28 +0200 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2017-10-23 02:00:28 +0200 |
commit | b9c8cce15e14b794ded457597e6efce17734d3f0 (patch) | |
tree | 2d3b5a40358c4109c90909820eef0603c9cc487e /jsonschema/tests | |
parent | 5c3abe21c7360930ca187b66e8038162c011d0e6 (diff) | |
download | jsonschema-b9c8cce15e14b794ded457597e6efce17734d3f0.tar.gz |
Shuffle around the other benchmark.
Diffstat (limited to 'jsonschema/tests')
-rw-r--r-- | jsonschema/tests/_suite.py | 10 |
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) |