Skip to content

Add missing pytest plugins to all extra#773

Open
majiahao-gif wants to merge 1 commit into
moorcheh-ai:mainfrom
majiahao-gif:fix/all-extra-test-deps
Open

Add missing pytest plugins to all extra#773
majiahao-gif wants to merge 1 commit into
moorcheh-ai:mainfrom
majiahao-gif:fix/all-extra-test-deps

Conversation

@majiahao-gif

@majiahao-gif majiahao-gif commented Jun 24, 2026

Copy link
Copy Markdown

Related to #770

Flaw summary

The advertised development setup path pip install -e ".[all]" does not install all pytest plugins required by the repository's own pytest configuration and async tests. In a clean environment, pytest stops during configuration/collection before any tests can run because pytest-asyncio and pytest-timeout are absent.

This is a setup/UX roadblock for the bug challenge because contributors following the package extra cannot reproduce or validate test cases locally without discovering and installing hidden test dependencies manually.

Reproduction

From a clean checkout with Python 3.12:

python -m venv .venv-all-check
.venv-all-check\\Scripts\\python.exe -m pip install -e ".[all]"
.venv-all-check\\Scripts\\python.exe -m pytest tests/test_api.py -q

Before this change, pytest fails before running tests with configuration/plugin errors such as:

  • 'asyncio' not found in markers configuration option
  • Unknown config option: timeout

Fix

Add the missing pytest plugins to the all optional dependency extra so the documented all-in development install matches the repository's test configuration:

  • pytest-asyncio>=0.21.0
  • pytest-timeout>=2.1.0

These were already present in the dev dependency group and tests/requirements.txt; this change keeps .[all] consistent with those paths.

Verification

.venv\\Scripts\\python.exe -m pytest -q
# 154 passed, 24 skipped

python -m venv .venv-all-check
.venv-all-check\\Scripts\\python.exe -m pip install -e ".[all]"
.venv-all-check\\Scripts\\python.exe -m pytest tests/test_api.py -q
# 53 passed

Summary by CodeRabbit

  • Chores
    • Added support libraries for asynchronous and timeout-based testing.
    • Existing mock testing support remains included.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7cc01381-ba1c-46f7-a342-9976df3889e9

📥 Commits

Reviewing files that changed from the base of the PR and between 6300c80 and 95c4d4e.

📒 Files selected for processing (1)
  • pyproject.toml

📝 Walkthrough

Walkthrough

Two test dependencies, pytest-asyncio and pytest-timeout, are added to the [project.optional-dependencies].all group in pyproject.toml. No code, exports, or public interfaces are changed.

Test Dependency Additions

Layer / File(s) Summary
Add pytest-asyncio and pytest-timeout to optional deps
pyproject.toml
pytest-asyncio (with a version constraint) and pytest-timeout are appended to the all optional-dependency list alongside the existing pytest-mock entry.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 Two new helpers join the test parade,
asyncio and timeout — tools of the trade!
With version pins neat and a comma in line,
The dependency garden grows perfectly fine.
Hop hop, little packages, now you belong! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding missing pytest plugins to the all extra.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Pull request overview

Aligns the .[all] development extra with the repository’s pytest configuration so a clean pip install -e ".[all]" environment can run tests without failing during pytest configuration/collection (notably for async tests and timeout config).

Changes:

  • Add pytest-asyncio>=0.21.0 to the all optional dependency extra.
  • Add pytest-timeout>=2.1.0 to the all optional dependency extra.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

3 participants