mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Remove some weird changes about importing again
This commit is contained in:
@@ -138,12 +138,6 @@ class Evaluator(object):
|
||||
),
|
||||
self,
|
||||
)
|
||||
# TODO remove this `if`
|
||||
if project is not None:
|
||||
# These imports are essential for Jedi and should therefore always
|
||||
# be present in the module cache.
|
||||
self.builtins_module
|
||||
self.typing_module
|
||||
|
||||
def import_module(self, import_names, parent_module_context=None,
|
||||
sys_path=None, load_stub=True):
|
||||
|
||||
@@ -412,12 +412,10 @@ def test_pre_defined_imports_module(Script, environment, name):
|
||||
|
||||
path = os.path.join(root_dir, name + '.py')
|
||||
module = Script('', path=path)._get_module()
|
||||
module_cache = module.evaluator.module_cache
|
||||
assert module.string_names == (name,)
|
||||
m, = module_cache.get((name,))
|
||||
assert m.py__file__() != path
|
||||
assert m.evaluator.builtins_module.py__file__() != path
|
||||
assert m.evaluator.typing_module.py__file__() != path
|
||||
|
||||
assert module.evaluator.builtins_module.py__file__() != path
|
||||
assert module.evaluator.typing_module.py__file__() != path
|
||||
|
||||
|
||||
@pytest.mark.parametrize('name', ('builtins', 'typing'))
|
||||
|
||||
Reference in New Issue
Block a user