diff options
author | Julian Berman <Julian@GrayVines.com> | 2022-08-17 14:51:12 +0300 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2022-08-17 14:51:12 +0300 |
commit | 8abbd1cb193d699ec40786363ea499e4ee471753 (patch) | |
tree | 9ddf7f0d57ef18f2bdabdffc0166057b62bd2b14 | |
parent | c72814786993e5db85b311368f8f34d40854053e (diff) | |
download | jsonschema-8abbd1cb193d699ec40786363ea499e4ee471753.tar.gz |
Better error message for network access in test runs.
-rw-r--r-- | jsonschema/tests/_suite.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jsonschema/tests/_suite.py b/jsonschema/tests/_suite.py index 0dcc741..a2148ba 100644 --- a/jsonschema/tests/_suite.py +++ b/jsonschema/tests/_suite.py @@ -209,8 +209,8 @@ class _Test(object): # XXX: #693 asks to improve the public API for this, since yeah, it's # bad. Figures that since it's hard for end-users, we experience # the pain internally here too. - def prevent_network_access(*args, **kwargs): - raise RuntimeError("Tried to access the network!") + def prevent_network_access(uri): + raise RuntimeError(f"Tried to access the network: {uri}") resolver.resolve_remote = prevent_network_access validator = Validator(schema=self.schema, resolver=resolver, **kwargs) |