pytest-dev / pytest-dev/pytest
plugin registration for assert rewrite for pytest_plugins is done one at a time at import time
Open
Nobody has claimed this yet.
topic: rewrite
type: bug
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
when registering a set of plugins that import from each other, this behavior is incorrect and leads to transient errors
as a workaround i had to put pytest.register_assert_rewrite(*pytest_plugins) after the declaration
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing pytest's plugin registration and pytest_plugins import handling. Reproduce the issue with a set of plugins that import from each other, then compare registration during import with the documented workaround. Done means mutually importing plugins register without transient errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100