-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[WIP] load_entrypoint_plugins option/marker #4521
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that looks like a good start well done, the necessary hacking you had to do inside of the config initialization points to yet another area for the config object detanglement
|
The config hack would not be required if pytest/src/_pytest/config/__init__.py Line 824 in d1221f1
Given that this adds But like asked in #4518 already: how to enable this for all of pytest's inner tests then? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @blueyed!
Please take a look at my comments. Other than that, we should add the option to the reference page.
| # Used to know when we are importing conftests after the pytest_configure stage | ||
| self._configured = False | ||
|
|
||
| def is_blocked(self, name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be a bummer to write one, but I guess we should add a functional test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, tests are fine.. :D
| def pytest_addoption(self, parser): | ||
| parser.addini( | ||
| "load_entrypoint_plugins", | ||
| help="only load specified plugins via entrypoint", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use type="args" here to force this to always be a list.
9a81f1a to
476c357
Compare
|
Rebased, and used type=args. I came across this again, since pytest-pdb also gets used in inline runs and then throws an error if an attribute exists already. |
fc323fa to
a67f8b0
Compare
TODO: should it not be called in this state?
a67f8b0 to
ebd606a
Compare
|
Hey @blueyed, Closing this for the same reasons as the other PRs, feel free to re-open it if you're still interested. 👍 |
Alternative to #4518.