chore: move test dependencies from extra to dependency group#112
Open
g4bri3lDev wants to merge 1 commit into
Open
chore: move test dependencies from extra to dependency group#112g4bri3lDev wants to merge 1 commit into
g4bri3lDev wants to merge 1 commit into
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Jul 5, 2026
Open
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pytest, pytest-asyncio, pytest-cov, pytest-xdist, and hypothesis lived in the
[project.optional-dependencies] testextra. Extras are not installed by a plainuv run, souv run pytestin a fresh checkout or git worktree silently fell back to whatever pytest is on $PATH — running the tests under a different interpreter against whateveropendisplaythat 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
testdependency group, included indev, so they are synced by default anduv run pytestalways 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 useuv sync --all-extras(±--group dev), which installs the defaultdevgroup; nothing referenced thetestextra by name.Test plan
uv run pytest: resolves.venv/bin/pytestand importsopendisplayfrom the current tree (previously: system pytest + foreign editable install)uv run --all-extras pytest -q→ 461 passeduv lockresolves cleanly; prek hooks (ruff/mypy/pylint) pass🤖 Generated with Claude Code