Skip to content

feat(pytest-plugin): dep extra to track minimum pytest version - #498

Merged
lengau merged 1 commit into
mainfrom
work/pytest-plugin-group
Oct 9, 2026
Merged

lengau merged 1 commit into
mainfrom
work/pytest-plugin-group

Conversation

@bepri

@bepri bepri commented Oct 9, 2026

Copy link
Copy Markdown
Member
  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run make lint && make test?

Adds a dependency group to help downstream users with pinning to an appropriate pytest version.

This wasn't a dependency at all in the past, so downstream users just had to coincidentally have pytest already in their env in order to use the plugin.

@bepri bepri self-assigned this Oct 9, 2026
@bepri
bepri requested a review from a team as a code owner October 9, 2026 15:17
Copilot AI lite review requested due to automatic review settings October 9, 2026 15:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Narrow the import exception handling and add coverage for the missing-pytest fallback.

2 open findings
What changed in this PR

Adds an optional craft-cli[pytest] dependency extra and improves missing-pytest diagnostics.

Changes:

  • Declares pytest>=8.4 as an optional dependency.
  • Updates the lockfile and changelog.
  • Adds import-time error handling for missing pytest.
File Summary
uv.lock Records the new optional dependency.
pyproject.toml Defines the pytest extra.
docs/​changelog.rst Documents the dependency and error behavior.
craft_cli/​pytest_plugin.py Adds pytest import handling; the handler should be narrowed and covered by an isolated test.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread craft_cli/pytest_plugin.py
Comment thread craft_cli/pytest_plugin.py
@bepri
bepri added this pull request to stack #500 October 9, 2026 15:28
@lengau
lengau requested a review from a team October 9, 2026 15:37
@lengau
lengau merged commit e4881fe into main Oct 9, 2026
32 checks passed
@lengau
lengau deleted the work/pytest-plugin-group branch October 9, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants