mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
Test auto_import_modules in a very basic way
This commit is contained in:
8
test/test_settings.py
Normal file
8
test/test_settings.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from jedi import settings
|
||||||
|
from jedi.evaluate.compiled import CompiledContextName
|
||||||
|
|
||||||
|
|
||||||
|
def test_base_auto_import_modules(monkeypatch, Script):
|
||||||
|
monkeypatch.setattr(settings, 'auto_import_modules', ['json'])
|
||||||
|
loads, = Script('import json; json.loads').goto_definitions()
|
||||||
|
assert isinstance(loads._name, CompiledContextName)
|
||||||
Reference in New Issue
Block a user