chore: block network access from unit tests

this blocks network access for all `tests/unit/` tests. `tests/integration/` are untouched.

it also introduces an `allow_network` marker to explicitly allow network access.
This commit is contained in:
Matthew Farrellee 2025-07-11 21:24:17 -04:00
parent 30b2e6a495
commit a01a679914
5 changed files with 32 additions and 0 deletions

View file

@ -64,6 +64,7 @@ dev = [
"pytest-cov",
"pytest-html",
"pytest-json-report",
"pytest-socket", # For blocking network access in unit tests
"nbval", # For notebook testing
"black",
"ruff",
@ -342,3 +343,6 @@ classmethod-decorators = ["classmethod", "pydantic.field_validator"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
markers = [
"allow_network: Allow network access for specific unit tests",
]