Skip to content

Use uv run pytest for uv-managed projects #16

Description

@benthomasson

Problem

--run-tests runs bare pytest, which fails in uv-managed projects where pytest is only available via uv run pytest. The review reports:

Running pytest on related test files...
Tests: 0 passed, 0 failed, 0 errors (0.02s) — ERROR

The system Python doesn't have pytest installed — it's a dev dependency managed by uv in the project's virtualenv.

Proposed Fix

Detect uv-managed projects (e.g., check for pyproject.toml with [tool.uv] or a .venv created by uv) and use uv run pytest instead of bare pytest. Fallback chain:

  1. uv run pytest (if uv project detected)
  2. pytest (current behavior)

Context

Discovered while reviewing benthomasson/ftl-sdlc-loop#10 — all 48 tests pass with uv run pytest but code-review review-loop --run-tests reports ERROR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions