test(conduct): skip smoke tests when conduct-litellm-guard not installed

The wrapper module imports its runtime from the conduct-litellm-guard
PyPI package. When the package is not installed in the CI environment,
the smoke tests can't verify wiring (the import raises before any test
runs). Use pytest.importorskip so BerriAI's default CI env doesn't
fail on this integration, while environments that do install the
package (via 'pip install conduct-litellm-guard[dev]' or similar)
still get the smoke coverage.

Full behavioural test coverage lives in the conduct-litellm-guard
package's own CI.
This commit is contained in:
Sudhi Seshachala 2026-08-24 17:10:57 -05:00 committed by Conduct AI
parent 73f98dd1df
commit c281e4d952
No known key found for this signature in database

View file

@ -14,6 +14,14 @@ import sys
import pytest
# The Conduct guardrail imports its runtime from `conduct-litellm-guard`
# on PyPI. When the package is not installed in the CI environment,
# skip — the wiring smoke tests only make sense against the real dep.
pytest.importorskip(
"conduct_litellm_guard",
reason="Install `conduct-litellm-guard` to test the Conduct guardrail integration.",
)
def test_import_module() -> None:
"""The wrapper module imports without side effects."""