mirror of
https://github.com/meta-llama/llama-stack.git
synced 2026-01-03 02:42:17 +00:00
[ez] move addoption to conftest in root test directory and fix broken imports
This commit is contained in:
parent
965644ce68
commit
4d3f0ae79b
9 changed files with 28 additions and 81 deletions
|
|
@ -81,21 +81,6 @@ def pytest_configure(config):
|
|||
)
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption(
|
||||
"--inference-model",
|
||||
action="store",
|
||||
default="meta-llama/Llama-3.2-3B-Instruct",
|
||||
help="Specify the inference model to use for testing",
|
||||
)
|
||||
parser.addoption(
|
||||
"--safety-shield",
|
||||
action="store",
|
||||
default="meta-llama/Llama-Guard-3-1B",
|
||||
help="Specify the safety shield to use for testing",
|
||||
)
|
||||
|
||||
|
||||
def pytest_generate_tests(metafunc):
|
||||
shield_id = metafunc.config.getoption("--safety-shield")
|
||||
if "safety_shield" in metafunc.fixturenames:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ import pytest
|
|||
from llama_stack.apis.agents import AgentConfig, Turn
|
||||
from llama_stack.apis.inference import SamplingParams, UserMessage
|
||||
from llama_stack.providers.datatypes import Api
|
||||
from llama_stack.providers.utils.kvstore import kvstore_impl, SqliteKVStoreConfig
|
||||
from llama_stack.providers.utils.kvstore import kvstore_impl
|
||||
from llama_stack.providers.utils.kvstore.config import SqliteKVStoreConfig
|
||||
|
||||
from .fixtures import pick_inference_model
|
||||
|
||||
from .utils import create_agent_session
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue