mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-27 18:52:03 +00:00
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:
parent
30b2e6a495
commit
a01a679914
5 changed files with 32 additions and 0 deletions
|
|
@ -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",
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue