-
Notifications
You must be signed in to change notification settings - Fork 124
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
Importing pytest_* modules should not trigger PluginValidationError #91
Comments
Agreed, thanks |
@The-Compiler looked at this and indeed this should never happen as I'm not sure how this occurs but it does re-enforce my my thinking we should not allow registering hookspecs based on project names alone and instead should require that all hooks and specs are explicitly marked with decorators. I'll try to see if I can simulate this with a test. |
Lines 241 to 256 in 01d3589
|
going for the future we should turn the hook discovery into policies so we can change them more reasonably |
This proves that pytest-dev#91 is a problem in `pytest` and not `pluggy`. Thanks to @RonnyPfannschmidt for the fix about a year ago ;)
This proves that pytest-dev#91 is a problem in `pytest` and not `pluggy`. Thanks to @RonnyPfannschmidt for the fix about a year ago ;)
@RonnyPfannschmidt not sure I agree with that diagnosis ;) Like I mentioned above the spot where the registration would be rejected is inside the My favourite part is that you @RonnyPfannschmidt wrote that code probably to fix this last year around this time hehe. I've added a test to prove this. Really like the policy idea btw 👍 |
#17 lol yes i did that |
@RonnyPfannschmidt @nicoddemus if this isn't motivation to get that de-vendoring done I don't know what is ;) Also can I close this since it's obviously not a problem with |
This proves that pytest-dev#91 is a problem in `pytest` and not `pluggy`. Thanks to @RonnyPfannschmidt for the fix about a year ago ;)
@tgoodlet the next pytest feature release will |
Definitely we can close this now, thanks @tgoodlet |
This proves that pytest-dev#91 is a problem in `pytest` and not `pluggy`. Thanks to @RonnyPfannschmidt for the fix about a year ago ;)
This proves that pytest-dev#91 is a problem in `pytest` and not `pluggy`. Thanks to @RonnyPfannschmidt for the fix about a year ago ;)
This proves that pytest-dev#91 is a problem in `pytest` and not `pluggy`. Thanks to @RonnyPfannschmidt for the fix about a year ago ;)
_pytest_datatest. With the release of Pytest 3.6.0, pluggy--a pytest dependency that was recently updated--has been raising the following error: pluggy.PluginValidationError: unknown hook 'pytest_datatest' in plugin <module 'datatest._pytest_plugin' The related behavior was changed in Pytest 3.6.0 in response to a deprecation in pluggy (pytest-dev/pytest#3487). While it seems clear that pluggy supported this without problems (see pytest-dev/pluggy#91), I'm not sure if the latest Pytest behavior is intentional or a regression. But in either case, we want to make sure the above error is avoided.
In pytest-dev/pytest-bdd#224 @soulrebel had an issue when importing
pytest_bdd
in hisconftest.py
file:This seems odd - importing a
pytest_*
module should work normally, no? Maybe pluggy should at least check that unknown hooks aren't module objects?The text was updated successfully, but these errors were encountered: