mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-02 00:34:44 +00:00
enable test filtering w/ --providers inference=...
This commit is contained in:
parent
0e496d1557
commit
bae9e8738c
1 changed files with 11 additions and 8 deletions
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from ..conftest import get_provider_fixture_overrides
|
||||||
|
|
||||||
from .fixtures import INFERENCE_FIXTURES
|
from .fixtures import INFERENCE_FIXTURES
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,11 +69,12 @@ def pytest_generate_tests(metafunc):
|
||||||
indirect=True,
|
indirect=True,
|
||||||
)
|
)
|
||||||
if "inference_stack" in metafunc.fixturenames:
|
if "inference_stack" in metafunc.fixturenames:
|
||||||
metafunc.parametrize(
|
fixtures = INFERENCE_FIXTURES
|
||||||
"inference_stack",
|
if filtered_stacks := get_provider_fixture_overrides(
|
||||||
[
|
metafunc.config,
|
||||||
pytest.param(fixture_name, marks=getattr(pytest.mark, fixture_name))
|
{
|
||||||
for fixture_name in INFERENCE_FIXTURES
|
"inference": INFERENCE_FIXTURES,
|
||||||
],
|
},
|
||||||
indirect=True,
|
):
|
||||||
)
|
fixtures = [stack.values[0]["inference"] for stack in filtered_stacks]
|
||||||
|
metafunc.parametrize("inference_stack", fixtures, indirect=True)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue