Skip to content

Python adapter: generate pytest commands for selected tests #57

Closed

Description

@adityankale190895

Part of the Python (pytest) adapter: #61.

Once DiffCI knows which test files are affected, it needs to turn them into a runnable command. Add pytest support to planSelectiveTestCommands in src/planner/test-command.ts, next to the existing Go and Maven cases.

Scope

  • Produce python -m pytest <file> <file> ... for selected test files.
  • Batch long file lists to stay under the existing command-length limits.
  • Refuse to build a command (and keep the plan advisory) when the repository runs tests through something DiffCI doesn't understand: tox, nox, a Makefile target, or pytest options set in a way that changes collection.

Done when

  • Tests cover a plain pytest project, a long selection that gets batched, and one refusal case.

Safety rule: when the adapter is unsure, it adds a blockers entry so DiffCI runs the full suite. An empty graph must never look like "nothing affected".


New to DiffCI? Read the adapter guide and CONTRIBUTING.md. Sign off commits with git commit -s. Comment here to claim it, and ask questions on the issue at any point.

Activity

  1. added
    enhancement
    good first issue
    on Oct 29, 2026
  2. adityankale190895 commented on Nov 7, 2026

    @adityankale190895
    MemberAuthor

    Shipped in CLI 0.3.33 (Core 0fd9ed0) as part of the pytest adapter. Real-repository feedback is tracked in #75.

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

    adapterenhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions