Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading plugin names in test session details #5661

Open
aklajnert opened this issue Jul 25, 2019 · 2 comments
Open

Misleading plugin names in test session details #5661

aklajnert opened this issue Jul 25, 2019 · 2 comments
Labels
topic: reporting related to terminal output and user-facing messages and errors type: enhancement new feature or API change, should be merged into features branch

Comments

@aklajnert
Copy link
Contributor

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 plugins section in the test session details display the real plugin name (e.g. pytest-bdd instead of bdd,
  • Allow using plugin name from the plugins section with -p no:<plugin-name> argument.
@blueyed
Copy link
Contributor

blueyed commented Jul 27, 2019

I think both of your suggested solutions for this are fine.

@RonnyPfannschmidt
Copy link
Member

i propose that we accept distribution names to disable all plugins of that distribution

we still need a way to distinguish between actual module names, entry-point names and python object names

i would like to propose that we use any name without a collon as whatever works,
for due diligence warn if its ambiguous, and additionally have no-mod/ep/dist: for picking exactly whats wanted

i believe this one needs to bubble into pluggy

@Zac-HD Zac-HD added topic: reporting related to terminal output and user-facing messages and errors type: enhancement new feature or API change, should be merged into features branch labels Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: reporting related to terminal output and user-facing messages and errors type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

4 participants