def test_raises_error_when_window_size_larger_than_grid_size(
        grid_size: tuple[int, int],
        kernel_size: int,
    ) -> None:
        """Test that an error is raised when the kernel size is larger than the grid size."""
        with pytest.raises(ValueError, match="Each dimension of the grid size must be greater than"):
            make_masks(grid_size, kernel_size)
Test that an error is raised when the kernel size is larger than the grid size.
tests/unit/models/image/winclip/test_utils.py