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

Installs as plugin.py #7

Open
jayvdb opened this issue Jan 26, 2020 · 5 comments
Open

Installs as plugin.py #7

jayvdb opened this issue Jan 26, 2020 · 5 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jayvdb
Copy link

jayvdb commented Jan 26, 2020

This plugin is installing as top level name plugin , which conflicts with other pytest plugins .. perhaps there is some common template being used?

It is also quite confusing to see backtraces like

  File "/path/to/site-packages/plugin.py", line 24, in pytest_configure
    for testpath in config.args:
AttributeError: 'Config' object has no attribute 'args'
@icemac
Copy link

icemac commented Jan 28, 2020

This seems more like a problem of the installer putting the module directly into the site-packages directory. Which installer are you using to get the module there?

@jayvdb
Copy link
Author

jayvdb commented Jan 29, 2020

I am running setup.py install

@icemac
Copy link

icemac commented Jan 29, 2020

I tried it myself and even pip install pytest-remove-stale-bytecode has this behavior.
So the easiest thing should be to rename plugin.py to something like pytest_remove_stale_bytecode.py.

A pull request is welcome.

@icemac icemac added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Jan 29, 2020
@jayvdb
Copy link
Author

jayvdb commented Jan 29, 2020

Was the filename used in this plugin choosen by a template/tool like cookiecutter? I am certain that I have seen this issue before, but I think I neglected to raise an issue as it was an isolated problem in a plugin that didnt seem especially useful to me personally. If so, we should check whether it has been fixed in the tool.

@icemac
Copy link

icemac commented Jan 30, 2020

The first commit (538058f) does not tell anything about the source of the skeleton used to create this project. Maybe it was created using an early version of https://github.com/pytest-dev/cookiecutter-pytest-plugin. But the current version of this packages does not seem to have this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants