Exemplo n.º 1
0
def test_log():
    p = Pen()
    p.stroke_mode(1.0)
    p.move_to(Point(-6, 0))
    p.turn_to(0)
    p.line_forward(6)
    p.turn_right(60)
    p.line_forward(6, end_slant=0)
    assert_equal(
        p.log(),
        [
            'stroke_mode(1.0)',
            'move_to((-6, 0))',  # Points are converted to tuples.
            'turn_to(0)',
            'line_forward(6)',
            'turn_right(60)',
            'line_forward(6, end_slant=0)',
        ]
    )
Exemplo n.º 2
0
def test_log():
    p = Pen()
    p.stroke_mode(1.0)
    p.move_to(Point(-6, 0))
    p.turn_to(0)
    p.line_forward(6)
    p.turn_right(60)
    p.line_forward(6, end_slant=0)
    assert_equal(
        p.log(),
        [
            'stroke_mode(1.0)',
            'move_to((-6, 0))',  # Points are converted to tuples.
            'turn_to(0)',
            'line_forward(6)',
            'turn_right(60)',
            'line_forward(6, end_slant=0)',
        ]
    )