Skip to content

Commit 8abbd1c

Browse files
committed
Better error message for network access in test runs.
1 parent c728147 commit 8abbd1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jsonschema/tests/_suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ def validate(self, Validator, **kwargs):
209209
# XXX: #693 asks to improve the public API for this, since yeah, it's
210210
# bad. Figures that since it's hard for end-users, we experience
211211
# the pain internally here too.
212-
def prevent_network_access(*args, **kwargs):
213-
raise RuntimeError("Tried to access the network!")
212+
def prevent_network_access(uri):
213+
raise RuntimeError(f"Tried to access the network: {uri}")
214214
resolver.resolve_remote = prevent_network_access
215215

216216
validator = Validator(schema=self.schema, resolver=resolver, **kwargs)

0 commit comments

Comments
 (0)