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:
David Halter
2013-08-11 17:30:50 +04:30
parent 9d1e527b7c
commit 0fef34c26e

View File

@@ -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
# ----------------- # -----------------