You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The Rego runner test raises StopIteration when verified conftest is absent #1538
test_default_structural_policy_runner_executes_rego (implementations/python/tests/test_repo_policy_tools.py:1264-1273, marked integration) locates the conftest binary with a bare next(...) over verified_tool_installation.default_installation_root(REPO_ROOT) / "conftest" (:1270). In a checkout where make policy has not installed the verified conftest, the generator is empty and the test ends in StopIteration without saying what is missing.
Reproduced on Linux (Ubuntu 24.04 x86_64), in a fresh worktree at deva4357f9a:
uv run --project implementations/python --frozen --all-extras python -m pytest \
"implementations/python/tests/test_repo_policy_tools.py::test_default_structural_policy_runner_executes_rego" \
-m 'integration or not integration' -q -p no:cacheprovider
> binary = next(
E StopIteration
implementations/python/tests/test_repo_policy_tools.py:1270: StopIteration
1 failed
#1474 hit the same failure on macOS and saw the test pass after make policy installed conftest.
Scope
Make the missing installation explicit: skip with a reason that names make policy, or fail with that message. Choose the behavior so that CI, which installs conftest, cannot skip silently.
Done when
Without the verified conftest installation, the test skips or fails with a message that names the missing installation and the command that installs it, and never raises StopIteration.
With the installation present, the test still runs the Rego policy and passes.
Activity