def test_pickle1(self): import pickle as p o0 = Orbital(1.) o1 = Orbital(1., tag='none') p0 = p.dumps(o0) p1 = p.dumps(o1) l0 = p.loads(p0) l1 = p.loads(p1) assert o0 == l0 assert o1 == l1 assert o0 != l1 assert o1 != l0
def test_basic1(self): orb = Orbital(1.) str(orb) orb = Orbital(1., tag='none') str(orb) orb = Orbital(1., 1., tag='none') str(orb) assert orb == orb.copy() assert orb != 1.
def test_scale1(self): o = Orbital(1.) assert o.scale(2).R == 2. o = Orbital(-1) assert o.scale(2).R == -1.
def test_psi1(self): # Orbital does not have radial part with pytest.raises(NotImplementedError): Orbital(1.).psi(np.arange(10))
def test_init1(self): assert Orbital(1.) == Orbital(1.) assert Orbital(1., tag='none') != Orbital(1.) assert Orbital(1., 1.) != Orbital(1.) assert Orbital(1., 1.) != Orbital(1., 1., tag='none')
def test_same1(self): rf = r_f(6) o0 = SphericalOrbital(0, rf) o1 = Orbital(5.0) assert o0.equal(o1) assert not o0.equal(Orbital(3.))
def test_psi1(self): Orbital(1.).psi(np.arange(10))
def test_radial1(self): Orbital(1.).radial(np.arange(10))