Skip to content

tests: stub live reachability probe in CLI tests - #102

Merged
aborruso merged 1 commit into
mainfrom
fix/cli-tests-network
Nov 3, 2026
Merged

aborruso merged 1 commit into
mainfrom
fix/cli-tests-network

Conversation

@aborruso

@aborruso aborruso commented Nov 3, 2026

Copy link
Copy Markdown
Member

CI on main failed after #101 (run 41635625122): test_get_non_csv_error_with_brackets_is_escaped printed ECB API unreachable.

Cause: CLI commands call _check_api_reachable, a live GET on the provider base URL, skipped only when a rate-limit file already exists. Locally the file is always there, so the probe never runs; on CI's fresh cache it runs, and a test inheriting the ECB provider from the previous test hit the real ECB. The PR run passed only because ECB answered that time.

Fix: autouse fixture in tests/conftest.py stubs the probe for the whole suite (no test is about it). Five older search --semantic tests had the same latent dependency on Eurostat being reachable.

Check: sockets blocked + empty cache, as on CI: 6 failed before, 521 passed after. ruff, mypy ok.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RCCNPK29nYpi1g2fypKy4x

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RCCNPK29nYpi1g2fypKy4x
@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

RetriggerView in Greptile

[Low impact] The PR appears safe to merge.

Summary

Adds a suite-wide fixture that skips the CLI’s live reachability request during tests.

  • CLI tests replace the provider reachability check with a no-op.

Reviews (1) · Last reviewed commit: "tests: stub live reachability probe in C..." · Reviewed by Greptile

@aborruso
aborruso merged commit 19405c4 into main Nov 3, 2026
2 checks passed
@aborruso
aborruso deleted the fix/cli-tests-network branch November 3, 2026 12:32
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.

1 participant