예제 #1
0
def test_add_path_big():
    prev_cut = path.matrix_cut(test_matrix, 7)
    next_cut = path.matrix_cut(test_matrix, 8)
    assert path.add_path(prev_cut, next_cut) == [956 + 111, 37 + 121]
예제 #2
0
def test_add_path_small():
    prev_cut = path.matrix_cut(test_matrix, 1)
    next_cut = path.matrix_cut(test_matrix, 2)
    assert path.add_path(prev_cut, next_cut) == [673 + 131, 201 + 131]
예제 #3
0
def test_matrix_cut_big():
    assert path.matrix_cut(test_matrix, 7) == [111, 121, 524]
예제 #4
0
def test_matrix_cut_over():
    with pytest.raises(ValueError):
        path.matrix_cut(test_matrix, 16)
예제 #5
0
def test_matrix_cut_small():
    assert path.matrix_cut(test_matrix, 2) == [673, 201]