Пример #1
0
def test_circle_action_method():
    renderer = Renderer()
    x, y, radius = renderer.get_x(), renderer.get_y(), randint(1, 100)
    renderer.circle_action(radius, x, y)
    assert renderer.paths[-1].path_type == "circle"
    assert renderer.paths[-1].r == radius
Пример #2
0
def check_jumpto_action_method_stays_within_viewer(x, y):
    renderer = Renderer()
    renderer.jumpto_action("{},{}".format(x, y))
    assert renderer.get_x() >= 0 and renderer.get_y() <= 460
    assert renderer.get_y() >= 0 and renderer.get_y() <= 460