'Check if adding of two 1D kernels works.'

def test_add_1D_kernels(self):

    box_1 = Box1DKernel(5)
    box_2 = Box1DKernel(3)
    box_3 = Box1DKernel(1)
    box_sum_1 = ((box_1 + box_2) + box_3)
    box_sum_2 = ((box_2 + box_3) + box_1)
    box_sum_3 = ((box_3 + box_1) + box_2)
    ref = [(1 / 5.0), ((1 / 5.0) + (1 / 3.0)), ((1 + (1 / 3.0)) + (1 / 5.0)), ((1 / 5.0) + (1 / 3.0)), (1 / 5.0)]
    assert_almost_equal(box_sum_1.array, ref, decimal=12)
    assert_almost_equal(box_sum_2.array, ref, decimal=12)
    assert_almost_equal(box_sum_3.array, ref, decimal=12)
    assert_almost_equal(box_1.array, [0.2, 0.2, 0.2, 0.2, 0.2], decimal=12)
    assert_almost_equal(box_2.array, [(1 / 3.0), (1 / 3.0), (1 / 3.0)], decimal=12)
    assert_almost_equal(box_3.array, [1], decimal=12)
