pytest-dev / pytest-dev/pytest
Misleading plugin names in test session details
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
Here is sample test session details from my environment:
============================= test session starts ==============================
platform linux -- Python 3.7.0, pytest-5.0.1, py-1.8.0, pluggy-0.12.0
cachedir: .pytest_cache
rootdir: /..., inifile: tox.ini
plugins: cov-2.6.1, pycharm-0.5.0, rerunfailures-7.0, sentry-0.1.0, bdd-3.1.0, pyfakefs-3.5.8
The last line displays a list of loaded plugins, which is very useful. According to the documentation, in order to disable a plugin, you need to use the -p argument, e.g. pytest -p no:<plugin-name>.
The problem is that not all plugin names are accurately reflected in the plugins section of the summary, to be useful with -p argument. For example, to disable cov you can use -p no:cov, but to disable bdd you need to use -p no:pytest-bdd. I have no idea how to disable the pyfakefs plugin. Neither -p no:pytest-pyfakefs nor -p no:pyfakefs works. I see no other option for retrieving that information other than debugging pytest itself.
I see two possible solutions here:
- In the
pluginssection in the test session details display the real plugin name (e.g.pytest-bddinstead ofbdd, - Allow using plugin name from the
pluginssection with-p no:<plugin-name>argument.
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
Reproduce the test session details output with plugins such as pytest-bdd and pyfakefs, then trace how plugin names are displayed and how the -p no: option resolves them. Done means the summary exposes names that can disable the corresponding plugins, or clearly documents a reliable way to retrieve and use their actual names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100