more improvements, so that almost all import tests pass again

This commit is contained in:
Dave Halter
2013-12-24 19:55:11 +01:00
parent 9e52d51a6b
commit 8326658134
3 changed files with 3 additions and 3 deletions

View File

@@ -587,7 +587,7 @@ class Evaluator(object):
current = next(path)
if isinstance(current, pr.Array):
result = [er.Array(current)]
result = [er.Array(self, current)]
else:
if isinstance(current, pr.NamePart):
# This is the first global lookup.

View File

@@ -196,7 +196,7 @@ class ImportPath(pr.Base):
scope, rest = self._follow_file_system()
except ModuleNotFound:
debug.warning('Module not found: ' + str(self.import_stmt))
self._evaluator.follow_statement.pop_stmt()
self._evaluator.recursion_detector.pop_stmt()
return []
scopes = [scope]

View File

@@ -506,7 +506,7 @@ class Execution(Executable):
for listener in func.listeners:
listener.execute(self._get_params())
if func.is_generator and not evaluate_generator:
return [Generator(func, self.var_args)]
return [Generator(self._evaluator, func, self.var_args)]
else:
"""
stmts = docstrings.find_return_types(func)