Skip to content

chore: move test dependencies from extra to dependency group#112

Open
g4bri3lDev wants to merge 1 commit into
mainfrom
chore/test-deps-group
Open

chore: move test dependencies from extra to dependency group#112
g4bri3lDev wants to merge 1 commit into
mainfrom
chore/test-deps-group

Conversation

@g4bri3lDev

Copy link
Copy Markdown
Member

Summary

pytest, pytest-asyncio, pytest-cov, pytest-xdist, and hypothesis lived in the [project.optional-dependencies] test extra. Extras are not installed by a plain uv run, so uv run pytest in a fresh checkout or git worktree silently fell back to whatever pytest is on $PATH — running the tests under a different interpreter against whatever opendisplay that interpreter could import (in the worst case, a stale editable install of a different checkout), instead of the tree under test.

This moves them to a test dependency group, included in dev, so they are synced by default and uv run pytest always uses the project venv. Test extras are development tooling, not publishable package metadata, so a group is also the semantically right home (uv docs).

No workflow or docs changes needed: test.yml/lint.yml/README all use uv sync --all-extras--group dev), which installs the default dev group; nothing referenced the test extra by name.

Test plan

  • fresh venv, plain uv run pytest: resolves .venv/bin/pytest and imports opendisplay from the current tree (previously: system pytest + foreign editable install)
  • uv run --all-extras pytest -q → 461 passed
  • uv lock resolves cleanly; prek hooks (ruff/mypy/pylint) pass

🤖 Generated with Claude Code

pytest & co. lived in the [project.optional-dependencies] test extra, so a
plain `uv run pytest` did not install them and silently fell back to any
pytest on PATH — running the tests against whatever opendisplay that
interpreter could import instead of the current tree. As a dependency
group included in dev, they are synced by default.

No workflow changes needed: test.yml/lint.yml sync the dev group by
default, and the test extra was never referenced by name.
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant