def test_multilline_no_transform(): # no subprocess transformations happen here since all variables are known code = 'ls = 1\nl = 1\nls -l\n' tree = check_parse(code) lsnode = tree.body[2] assert 3 == min_line(lsnode) assert isinstance(lsnode.value, BinOp)
def test_multilline_no_transform(): # No subprocess transformations happen here, since all variables are known. code = "ls = 1\nl = 1\nls -l\n" tree = check_parse(code) lsnode = tree.body[2] assert 3 == min_line(lsnode) assert isinstance(lsnode.value, BinOp)
def test_multilline_num(xonsh_execer, line1): # Subprocess transformation happens on the second line, # because not all variables are known. code = line1 + "\nls -l\n" tree = check_parse(code) lsnode = tree.body[1] assert 2 == min_line(lsnode) assert isinstance(lsnode.value, Call)
def test_multilline_num(): code = ('x = 1\n' 'ls -l\n') # this second line wil be transformed tree = check_parse(code) lsnode = tree.body[1] assert 2 == min_line(lsnode)
def test_multilline_num(xonsh_builtins, line1): code = line1 + '\nls -l\n' tree = check_parse(code) lsnode = tree.body[1] assert 2 == min_line(lsnode) assert isinstance(lsnode.value, Call)
def test_multilline_num(): code = ('x = 1\n' 'ls -l\n') # this second line wil be transformed tree = check_parse(code) lsnode = tree.body[1] assert_equal(2, min_line(lsnode))
def test_multilline_num(line1): code = line1 + '\nls -l\n' tree = check_parse(code) lsnode = tree.body[1] assert 2 == min_line(lsnode) assert isinstance(lsnode.value, Call)
def test_multilline_num(xonsh_execer, line1): code = line1 + "\nls -l\n" tree = check_parse(code) lsnode = tree.body[1] assert 2 == min_line(lsnode) assert isinstance(lsnode.value, Call)
def test_multilline_num(line1): code = line1 + "\nls -l\n" tree = check_parse(code) lsnode = tree.body[1] assert 2 == min_line(lsnode) assert isinstance(lsnode.value, Call)