def test_cannot_position_tile_beyond_grid(position, x, y): from example import position_tile, Position, make_tile, make_grid grid = make_grid(5, 5) position = Position(*position) tile = make_tile('ship', position) grid = position_tile(grid, tile, position) assert grid[y][x] == tile
def five_grid(): from example import make_grid return make_grid(5, 5)
def test_create_grid(x, y, expected): from example import make_grid grid = make_grid(x, y) assert expected == (len(grid[0]), len(grid))