Remove the module path from the parser tree.

Some static analysis tests are still failing.
This commit is contained in:
Dave Halter
2017-03-27 18:13:32 +02:00
parent b60ec024fa
commit 8a35a04439
14 changed files with 102 additions and 101 deletions

View File

@@ -15,7 +15,7 @@ from ..helpers import cwd_at
def check_module_test(code):
grammar = load_grammar()
module_context = ModuleContext(Evaluator(grammar), parse(code))
module_context = ModuleContext(Evaluator(grammar), parse(code), path=None)
return _check_module(module_context)
@@ -68,7 +68,7 @@ def test_sys_path_with_modifications():
path = os.path.abspath(os.path.join(os.curdir, 'module_name.py'))
grammar = load_grammar()
module_node = parse(code, path=path)
module_context = ModuleContext(Evaluator(grammar), module_node)
module_context = ModuleContext(Evaluator(grammar), module_node, path=path)
paths = sys_path_with_modifications(module_context.evaluator, module_context)
assert '/tmp/.buildout/eggs/important_package.egg' in paths