'Test smoothing of an image with a single positive pixel
Compares a small uniform kernel to the Box2DKernel'

@pytest.mark.parametrize((u'shape', u'width'), list(itertools.product(SHAPES_ODD, [1, 3, 5])))
def test_smallkernel_Box2DKernel(self, shape, width):

    kernel1 = (np.ones([width, width]) / (np.float(width) ** 2))
    kernel2 = Box2DKernel(width, mode=u'oversample', factor=10)
    x = np.zeros(shape)
    xslice = [slice((sh // 2), ((sh // 2) + 1)) for sh in shape]
    x[xslice] = 1.0
    c2 = convolve_fft(x, kernel2, boundary=u'fill')
    c1 = convolve_fft(x, kernel1, boundary=u'fill')
    assert_almost_equal(c1, c2, decimal=12)
    c2 = convolve(x, kernel2, boundary=u'fill')
    c1 = convolve(x, kernel1, boundary=u'fill')
    assert_almost_equal(c1, c2, decimal=12)
