mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-23 00:41:40 +00:00
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:
parent
73f98dd1df
commit
c281e4d952
1 changed files with 8 additions and 0 deletions
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue