Пример #1
0
def test_press_key_down():
    browser = Browser()
    grid_orig = browser.read_grid()
    browser.press_key(Keys.DOWN)
    grid = browser.read_grid()
    browser.finish()
    grid_ref = create_new_grid_with_move(grid_orig, Keys.DOWN)
    assert_at_most_one_different_element(grid_ref, grid)
Пример #2
0
def test_read_grid():
    # display = Display(visible=0)
    # display.start()
    browser = Browser()
    grid = browser.read_grid()
    browser.finish()
    nb_zero = sum([row.count(0) for row in grid])
    assert_equals(nb_zero, 14)