-
Notifications
You must be signed in to change notification settings - Fork 493
Closed
Labels
Description
Refactor LLM tests to remove duplicate test definitions by parameterizing credentials and leveraging dynamic fixture injection while preserving marker-based filtering with pytest -m.
# Define test cases with the necessary parameters
all_llm_fixture_credentials = [
pytest.param(
"credentials_gpt_4o",
marks=pytest.mark.openai
),
pytest.param(
"credentials_gemini_pro",
marks=pytest.mark.gemini
),
pytest.param(
"credentials_anthropic_claude_sonnet",
marks=pytest.mark.anthropic
),
]
@pytest.mark.parametrize("credentials_fixture", all_llm_fixture_credentials)
def test_groupchat_logging(credentials_fixture, request, db_connection):
# Retrieve the credentials dynamically using `request.getfixturevalue`
credentials = request.getfixturevalue(credentials_fixture)
_test_groupchat_logging(credentials, credentials, db_connection)Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done