def test_varName_complex2(self): string_to_file("#PREDICATE y=f(g(x)(z))", file_name) ast_string = file_to_AST_str(file_name) root = str_ast_to_python_ast(ast_string) idNodes = find_var_nodes(root) var_list = [n.idName for n in idNodes] assert set(var_list)==set(['f','g','x','y','z'])
def test_varName_simple2(self): string_to_file("#PREDICATE x<4 & x<42", file_name) ast_string = file_to_AST_str(file_name) root = str_ast_to_python_ast(ast_string) idNodes = find_var_nodes(root) var_list = [n.idName for n in idNodes] assert var_list==['x']