'Check if the different modes result in kernels that work with convolve.
Use only small kernel width, to make the test pass quickly.'

@pytest.mark.parametrize((u'kernel_type', u'mode'), list(itertools.product(KERNEL_TYPES, MODES)))
def test_discretize_modes(self, kernel_type, mode):

    if ((kernel_type == AiryDisk2DKernel) and (not HAS_SCIPY)):
        pytest.skip(u'Omitting    AiryDisk2DKernel,    which    requires    SciPy')
    if (not (kernel_type == Ring2DKernel)):
        kernel = kernel_type(3)
    else:
        kernel = kernel_type(3, (3 * 0.2))
    if (kernel.dimension == 1):
        c1 = convolve_fft(delta_pulse_1D, kernel, boundary=u'fill', normalize_kernel=False)
        c2 = convolve(delta_pulse_1D, kernel, boundary=u'fill', normalize_kernel=False)
        assert_almost_equal(c1, c2, decimal=12)
    else:
        c1 = convolve_fft(delta_pulse_2D, kernel, boundary=u'fill', normalize_kernel=False)
        c2 = convolve(delta_pulse_2D, kernel, boundary=u'fill', normalize_kernel=False)
        assert_almost_equal(c1, c2, decimal=12)
