Skip to content

Commit 8d123b1

Browse files
committed
examples: skip the code-review tests when their optional deps are absent
The example ships its own dependencies, which the SDK test job does not install, so importing the test module failed collection in the main CI. Guard the module with importorskip on unidiff so it skips cleanly when the example dependencies are not present and runs in full when they are. Updates #92 RELEASE NOTES: NONE
1 parent 32d92a6 commit 8d123b1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/examples/test_skills_code_review_agent.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
if str(_EXAMPLE_DIR) not in sys.path:
2020
sys.path.insert(0, str(_EXAMPLE_DIR))
2121

22+
# This example ships its own dependencies (examples/skills_code_review_agent/requirements.txt) that the
23+
# SDK's test job does not install. Skip the whole module cleanly when they are absent rather than failing
24+
# collection in the main CI.
25+
pytest.importorskip("unidiff", reason="run: pip install -r examples/skills_code_review_agent/requirements.txt")
26+
2227
from pipeline import report as report_mod # noqa: E402
2328
from pipeline.dedup import dedup_and_denoise # noqa: E402
2429
from pipeline.engine import run_review # noqa: E402

0 commit comments

Comments
 (0)