pytest-dev / pytest-dev/pytest
pytester.Testdir.plugins is confusing and clunky
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
pytester.TestDir.plugins is used two different ways:
- as a list of Python objects or
strwhich are handed to the config parser - as a list of strings handed as names to a subprocess
I propose just getting rid of it and instead having runpytest_subprocess and parseconfig accept it as a keyword arg like inline_run does.
It's also awkward that you have to manually mutate the list in order to use it.
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 in _pytest/pytester.py at TestDir.plugins and compare the existing inline_run keyword-argument pattern. Trace the parseconfig and runpytest_subprocess usages referenced in the issue, then determine the affected callers; done means those APIs handle plugins without the confusing shared list and the relevant pytester behavior remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100