def test_cg_dict_init(self, maxl): cg_dict = CGDict(maxl=maxl) assert len(cg_dict.keys()) == (maxl + 1)**2 for key, val in cg_dict.items(): assert val * val.t()
def test_cg_dict_update_maxl(self, maxl1, maxl2): maxl = max(maxl1, maxl2) cg_dict = CGDict(maxl=maxl1) cg_dict.update_maxl(maxl2) assert cg_dict.maxl == maxl assert set(cg_dict.keys()) == {(l1, l2) for l1 in range(maxl + 1) for l2 in range(maxl + 1)}
def test_cg_dict_init(self, maxl): cg_dict = CGDict(maxl=maxl) assert set(cg_dict.keys()) == {(l1, l2) for l1 in range(maxl + 1) for l2 in range(maxl + 1)}