Beispiel #1
0
def test_draw_line3():
    assert draw_line(1,1,1,4,create_screen(5,5)) == \
           [[0, 0, 0, 0, 0], [0, 1, 1, 1, 1], [0, 0, 0, 0, 0],
            [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
Beispiel #2
0
def test_draw_line1():
    assert draw_line(0,0,4,4,create_screen(5,5)) == \
           [[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0],
            [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]]
Beispiel #3
0
def test_draw_line2():
    assert draw_line(3,5,2,0,create_screen(6,6)) == \
            [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0],
            [0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]
Beispiel #4
0
def test_draw_line5():
    assert draw_line(2,2,2,2,create_screen(6,6)) == \
           [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0],
            [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]