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

pytest_config variable in a plugin is detected as a hook #3526

Closed
Sup3rGeo opened this issue Jun 1, 2018 · 2 comments
Closed

pytest_config variable in a plugin is detected as a hook #3526

Sup3rGeo opened this issue Jun 1, 2018 · 2 comments
Labels
type: regression indicates a problem that was introduced in a release which was working previously

Comments

@Sup3rGeo
Copy link
Member

Sup3rGeo commented Jun 1, 2018

Hi,

In a plugin I have defined a module variable called pytest_config.

I had no problems in pytest-3.5.0 but when using pytest-3.6.0 I get this following error:

INTERNALERROR> pluggy.PluginValidationError: unknown hook 'pytest_config' in plugin <module 'xxxx.plugin' from 'c:\\xxxx\\plugin.py'>

Solution was trivial, just renamed to _pytest_config, but I would just like to inform this as it could be breaking backwards compatibility from 3.5.0 to 3.6.0.

@pytestbot
Copy link
Contributor

GitMate.io thinks possibly related issues are #939 (terminalreporter plugin not available in pytest_configure hook), #732 (Unregistered plugin still receives hook calls), #1062 (hook specs are not set for other plugin hooks), #3385 (plugin hook pytest_runtest_teardown runs on skipped test), and #1821 (Pytest verifies if hooks are valid before processing "pytest_plugins" variable).

@pytestbot pytestbot added the platform: mac mac platform-specific problem label Jun 1, 2018
@RonnyPfannschmidt RonnyPfannschmidt added type: regression indicates a problem that was introduced in a release which was working previously and removed platform: mac mac platform-specific problem labels Jun 1, 2018
@nicoddemus
Copy link
Member

Fixed by #3775 in 3.7.2. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression indicates a problem that was introduced in a release which was working previously
Projects
None yet
Development

No branches or pull requests

4 participants