Skip to content

Register mypy_testing pytest marker - #990

Open
MbappeWU wants to merge 1 commit into
ipython:mainfrom
MbappeWU:fix-register-mypy-testing-marker
Open

MbappeWU wants to merge 1 commit into
ipython:mainfrom
MbappeWU:fix-register-mypy-testing-marker

Conversation

@MbappeWU

Copy link
Copy Markdown

Problem

pyproject.toml enables --strict-markers, and tests/test_typing.py uses @pytest.mark.mypy_testing. That marker is missing from the pytest markers list. The pytest-mypy-testing plugin registers it when the plugin is installed. Packagers often run the suite without that plugin. Collection then fails with 'mypy_testing' not found in markers configuration option.

Fix

Register mypy_testing in the markers list, with a short description in the same form as the existing entries.

Verification

Commands ran from the repo root in .venv on Python 3.13.5 and pytest 9.1.1.

Before the change, with pytest-mypy-testing uninstalled, .venv/bin/python -m pytest tests/test_typing.py exited 2. Collection reported 'mypy_testing' not found in markers configuration option.

Before the change, with pytest-mypy-testing 0.2.0 installed, the same command exited 0. 15 passed.

After the change, with the plugin uninstalled, .venv/bin/python -m pytest tests/test_typing.py exited 5. Pytest collected 0 tests and printed no marker error. Those functions are named mypy_*, so they are test items only when the plugin is installed. .venv/bin/python -m pytest exited 0. 695 passed, 1 skipped, 1 warning.

After the change, with pytest-mypy-testing 0.2.0 installed, .venv/bin/python -m pytest tests/test_typing.py exited 0. 15 passed. .venv/bin/python -m pytest exited 0. 710 passed, 1 skipped, 1 warning.

pre-commit run --files pyproject.toml passed (check toml, codespell, sp-repo-review and the other applicable hooks; Python/Markdown hooks had no files to check).

This change was prepared with AI assistance (Cursor CLI) and reviewed by me.

Fixes #889

Co-authored-by: Cursor <cursoragent@cursor.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-11T10:22:19.708375Z 8c0d204 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.20%. Comparing base (c4f1247) to head (8c0d204).

Components Coverage Δ
traitlets 85.63% <ø> (ø)
tests 99.07% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

5.13.0: pytest is failing with error in tests/test_typing.py

2 participants