Problem
tests/nameres/test_blocklist.py calls load_blocklist_from_gsheet() at module level:
blocklist_entries = load_blocklist_from_gsheet()
This fires an HTTP request to Google Sheets during pytest collection, before any --target is processed and before the user has a chance to skip the test. It makes pytest --collect-only slow and fails immediately with a network error if the sheet is unavailable.
Suggested Fix
Move the call into a session-scoped fixture so it only runs when the tests are actually about to execute:
@pytest.fixture(scope="session")
def blocklist_entries():
return load_blocklist_from_gsheet()
And parametrize test_check_blocklist_entry using indirect or pytest_generate_tests.
Why it was deferred
Pre-existing behavior made more visible by the PR #67 library refactor. Deferred to avoid scope creep.
Problem
tests/nameres/test_blocklist.pycallsload_blocklist_from_gsheet()at module level:This fires an HTTP request to Google Sheets during pytest collection, before any
--targetis processed and before the user has a chance to skip the test. It makespytest --collect-onlyslow and fails immediately with a network error if the sheet is unavailable.Suggested Fix
Move the call into a session-scoped fixture so it only runs when the tests are actually about to execute:
And parametrize
test_check_blocklist_entryusingindirectorpytest_generate_tests.Why it was deferred
Pre-existing behavior made more visible by the PR #67 library refactor. Deferred to avoid scope creep.