mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
finding out that fake imports arent't allowed in python and os.path is a sys.modules modification, fix tests #213
This commit is contained in:
@@ -72,14 +72,19 @@ def builtin_test():
|
||||
import math
|
||||
|
||||
def scope_from_import_variable():
|
||||
#? int()
|
||||
"""
|
||||
All of them shouldn't work, because "fake" imports don't work in python
|
||||
without the use of ``sys.modules`` modifications (e.g. ``os.path`` see also
|
||||
github issue #213 for clarification.
|
||||
"""
|
||||
#?
|
||||
from import_tree.mod2.fake import a
|
||||
#? set
|
||||
#?
|
||||
from import_tree.mod2.fake import c
|
||||
|
||||
#? int()
|
||||
#?
|
||||
a
|
||||
#? set
|
||||
#?
|
||||
c
|
||||
|
||||
def scope_from_import_variable_with_parenthesis():
|
||||
@@ -87,9 +92,9 @@ def scope_from_import_variable_with_parenthesis():
|
||||
a, c
|
||||
)
|
||||
|
||||
#? int()
|
||||
#?
|
||||
a
|
||||
#? set
|
||||
#?
|
||||
c
|
||||
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user