@@ -0,0 +1,536 @@
+#!/usr/bin/env python3%0A%0Afrom __future__ import print_function, division%0A%0Aimport numpy as np%0Afrom sht.utils import l_to_lm%0A%0Adef test_l_to_lm():%0A    L = 10%0A    x = np.random.randn(L)%0A%0A    # Test without fill_zeros%0A    y = l_to_lm(x)%0A    for i in range(L):%0A        assert np.array_equal(y%5Bi**2:(i+1)**2%5D, x%5Bi%5D * np.ones(2 * i + 1))%0A%0A    # Test with fill_zeros%0A    z = l_to_lm(x, fill_zeros=True)%0A    l = np.arange(L)%0A    assert np.array_equal(z%5Bl**2 + l%5D, x)%0A    z = np.delete(z, l**2 + l)%0A    assert np.array_equal(z, np.zeros(L**2 - L))%0A

Add a test for l_to_lm.