コード例 #1
0
ファイル: test_path.py プロジェクト: brycepg/baron-fork
def test_bb_class():
    node = parse(classcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (7, 0))
コード例 #2
0
ファイル: test_path.py プロジェクト: brycepg/baron-fork
def test_bb_split_assignment():
    node = parse(splitcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (2, 5))
コード例 #3
0
ファイル: test_path.py プロジェクト: brycepg/baron-fork
def test_bb_name():
    node = parse("var")[0]
    assert node_to_bounding_box(node) == ((1, 1), (1, 3))
コード例 #4
0
ファイル: test_path.py プロジェクト: brycepg/baron-fork
def test_bb_funcdef():
    node = parse(bigcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (4, 0))
コード例 #5
0
ファイル: test_path.py プロジェクト: Astalaseven/baron
def test_bb_split_assignment():
    node = parse(splitcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (2, 5))
コード例 #6
0
ファイル: test_path.py プロジェクト: Astalaseven/baron
def test_bb_class():
    node = parse(classcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (6, 21))
コード例 #7
0
ファイル: test_path.py プロジェクト: Astalaseven/baron
def test_bb_funcdef():
    node = parse(funcdefcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (3, 9))
コード例 #8
0
ファイル: test_path.py プロジェクト: Astalaseven/baron
def test_bb_name():
    node = parse("var")[0]
    assert node_to_bounding_box(node) == ((1, 1), (1, 3))
コード例 #9
0
ファイル: test_path.py プロジェクト: PyCQA/baron
def test_bb_funcdef():
    node = parse(bigcode)[0]
    assert node_to_bounding_box(node) == ((1, 1), (4, 0))