示例#1
0
 def paths(src):
     script = Script(src)
     expr_stmt = script._get_module_node().children[0].children[0]
     return set(
         sys_path._paths_from_assignment(script._get_module(), expr_stmt))
示例#2
0
 def paths(src):
     script = Script(src)
     expr_stmt = script._get_module_node().children[0].children[0]
     return set(sys_path._paths_from_assignment(script._get_module(), expr_stmt))
示例#3
0
def test_equals(source):
    script = Script(source)
    node = script._get_module_node().children[0].children[0]
    first, = script._get_module().eval_node(node)
    assert isinstance(first, CompiledObject) and first.obj is True
示例#4
0
 def paths(src):
     script = Script(src)
     stmt = script._get_module_node().statements[0]
     return set(sys_path._paths_from_assignment(script._get_module(), stmt))
示例#5
0
def test_equals(source):
    script = Script(source)
    node = script._get_module_node().children[0].children[0]
    first, = script._get_module().eval_node(node)
    assert isinstance(first, CompiledObject) and first.obj is True