skip tests

This commit is contained in:
Swapna Lekkala 2025-08-12 16:24:06 -07:00
parent 356b4dff88
commit faf69e9ed2

View file

@ -124,7 +124,11 @@ def test_safe_examples(client_with_models, shield_id):
assert response.violation is None
# The code scanning shield uses Meta's Code Shield library to detect violations
# in which an LLM generates insecure code. Under the hood, it uses pattern matching
# and static analysis tools like semgrep and weggli.
def test_safety_with_code_scanner(client_with_models, code_scanner_shield_id, model_providers):
# TODO: add more providers for code scanner shields
code_safety_enabled = len(CODE_SCANNER_ENABLED_PROVIDERS & model_providers) > 0
if not code_safety_enabled:
pytest.skip(f"Testing code scanner shields is not supported for model_providers {model_providers}")