Beispiel #1
0
def test_bb_class():
    node = parse(classcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (7, 0))
Beispiel #2
0
def test_bb_split_assignment():
    node = parse(splitcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (2, 5))
Beispiel #3
0
def test_bb_name():
    node = parse("var")[0]
    assert node_to_bounding_box(node) == ((1, 1), (1, 3))
Beispiel #4
0
def test_bb_funcdef():
    node = parse(bigcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (4, 0))
Beispiel #5
0
def test_bb_split_assignment():
    node = parse(splitcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (2, 5))
Beispiel #6
0
def test_bb_class():
    node = parse(classcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (6, 21))
Beispiel #7
0
def test_bb_funcdef():
    node = parse(funcdefcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (3, 9))
Beispiel #8
0
def test_bb_name():
    node = parse("var")[0]
    assert node_to_bounding_box(node) == ((1, 1), (1, 3))
Beispiel #9
0
def test_bb_funcdef():
    node = parse(bigcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (4, 0))