pytest-dev / pytest-dev/pytest

pytester.Testdir.plugins is confusing and clunky

Open
#2,126 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

plugin: pytester type: backward compatibility type: refactoring
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:

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.