-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
Complete pytest #257
Comments
The reason for this is that pytest uses some code to populate the namespace, including all plugins. if __name__ == '__main__': # if run as a script or by 'python -m pytest'
# we trigger the below "else" condition by the following import
import pytest
raise SystemExit(pytest.main())
else:
# we are simply imported
from _pytest.core import main, UsageError, _preloadplugins
from _pytest import core as cmdline
from _pytest import __version__
_preloadplugins() # to populate pytest.* namespace so help(pytest) works _preloadplugins looks like this: def _preloadplugins():
_preinit.append(PluginManager(load=True)) |
|
Is that still the case, or has there been progress in that regard?
AFAIK this is done for the plugin system, which is also used internally. Is there a way to whitelist e.g. this specific module to allow for code execution to discover imports? (assuming that this is the main issue here) What about some callback that could be provided to help Jedi here? |
I'm currently on holidays (have been for 2 weeks already), might still take another week until I answer. |
Yes, that is still the case. However the big difference is that the import logic in Jedi is very similar to Python's. This means that implementing I'm not sure if this would really help you, though (for this problem).
What would be your plan?
There's currently no whitelist. Well, maybe there is. But I'm not sure if
Well, tell me what you need and we talk :) |
Completion in pytest does not work.
There are many attributes missing:
The text was updated successfully, but these errors were encountered: