mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +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
|
import math
|
||||||
|
|
||||||
def scope_from_import_variable():
|
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
|
from import_tree.mod2.fake import a
|
||||||
#? set
|
#?
|
||||||
from import_tree.mod2.fake import c
|
from import_tree.mod2.fake import c
|
||||||
|
|
||||||
#? int()
|
#?
|
||||||
a
|
a
|
||||||
#? set
|
#?
|
||||||
c
|
c
|
||||||
|
|
||||||
def scope_from_import_variable_with_parenthesis():
|
def scope_from_import_variable_with_parenthesis():
|
||||||
@@ -87,9 +92,9 @@ def scope_from_import_variable_with_parenthesis():
|
|||||||
a, c
|
a, c
|
||||||
)
|
)
|
||||||
|
|
||||||
#? int()
|
#?
|
||||||
a
|
a
|
||||||
#? set
|
#?
|
||||||
c
|
c
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
Reference in New Issue
Block a user