Pytest parameterize tests
- How do we repeat a test with different inputs?
- Use the
@pytest.mark.parametrize decorator
@pytest.mark.parametrize("row,col", [(-1, -2), (51, 24), (8, 7)])
@pytest.mark.parametrize("n", [1, 2, 3])
def test_empty_board_make_move_invalid_square(
n: int, row: int, col: int
) -> None:
board = Board(n)
assert board.valid(row, col) is False