support non value for test config

This commit is contained in:
Sixian Yi 2025-01-15 13:45:55 -08:00
parent 26d9804efd
commit 11b2fdd3d8
4 changed files with 15 additions and 9 deletions

View file

@ -92,7 +92,7 @@ def pytest_generate_tests(metafunc):
config_override_safety_shield,
custom_provider_fixtures,
) = (None, None, None)
if test_config is not None:
if test_config is not None and test_config.agent is not None:
config_override_inference_models = test_config.agent.fixtures.inference_models
config_override_safety_shield = test_config.agent.fixtures.safety_shield
custom_provider_fixtures = get_provider_fixtures_from_config(