Skip to content

Fail a test that reaches the network - #232

Merged
fniessink merged 1 commit into
mainfrom
claude/issue-216-0801aa
Aug 11, 2026
Merged

Fail a test that reaches the network#232
fniessink merged 1 commit into
mainfrom
claude/issue-216-0801aa

Conversation

@fniessink

Copy link
Copy Markdown
Member

Importing the tests package now refuses the network to every test in it, so a test that makes a real request fails naming the address it tried to reach, rather than being answered by the live registry. socket.getaddrinfo refuses a request to a host name before its lookup reaches the resolver, and socket.socket.connect refuses one to a literal address. The refusal is a RuntimeError rather than a connection error, since io.fetch turns a requests exception into a logged None and would leave the run green.

Closes #216.

Importing the `tests` package now refuses the network to every test in it, so a
test that makes a real request fails naming the address it tried to reach,
rather than being answered by the live registry. `socket.getaddrinfo` refuses a
request to a host name before its lookup reaches the resolver, and
`socket.socket.connect` refuses one to a literal address. The refusal is a
`RuntimeError` rather than a connection error, since `io.fetch` turns a
`requests` exception into a logged `None` and would leave the run green.

Closes #216.
@fniessink
fniessink merged commit d193e1d into main Aug 11, 2026
1 check passed
@fniessink
fniessink deleted the claude/issue-216-0801aa branch August 11, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail a test that reaches the network

1 participant