From: <bao...@us...> - 2006-05-24 19:16:12
|
Revision: 156 Author: baoilleach Date: 2006-05-24 12:16:00 -0700 (Wed, 24 May 2006) ViewCVS: http://svn.sourceforge.net/cclib/?rev=156&view=rev Log Message: ----------- The typecode of homos is 'i', which needed to be specified in the tests and in the parsers Modified Paths: -------------- trunk/src/cclib/parser/adfparser.py trunk/test/testGeoOpt.py trunk/test/testSPun.py Modified: trunk/src/cclib/parser/adfparser.py =================================================================== --- trunk/src/cclib/parser/adfparser.py 2006-05-24 18:20:44 UTC (rev 155) +++ trunk/src/cclib/parser/adfparser.py 2006-05-24 19:16:00 UTC (rev 156) @@ -285,7 +285,7 @@ temp=Numeric.array(self.moenergies,"f") self.moenergies=temp - self.homos=Numeric.array(self.homos) + self.homos=Numeric.array(self.homos,"i") if line[1:24]=="List of All Frequencies": # Start of the IR/Raman frequency section Modified: trunk/test/testGeoOpt.py =================================================================== --- trunk/test/testGeoOpt.py 2006-05-24 18:20:44 UTC (rev 155) +++ trunk/test/testGeoOpt.py 2006-05-24 19:16:00 UTC (rev 156) @@ -1,16 +1,16 @@ import os import math +import Numeric import unittest import bettertest -from Numeric import array from testall import getfile from cclib.parser import ADF, GAMESS, Gaussian, Jaguar class GenericGeoOptTest(bettertest.TestCase): def testhomos(self): """Is the index of the homo equal to 34?""" - self.assertArrayEquals(self.data.homos,array([34]),"%s != array([34])" % self.data.homos) + self.assertArrayEquals(self.data.homos,Numeric.array([34],"i"),"%s != array([34],'i')" % Numeric.array_repr(self.data.homos)) def testatomcoords(self): """Are atomcoords consistent with natom and Angstroms?""" @@ -62,7 +62,7 @@ def testscfvaluetype(self): """Do the scf values have the right type?""" self.assertEquals(type(self.data.scfvalues),type([])) - self.assertEquals(type(self.data.scfvalues[0]),type(array([]))) + self.assertEquals(type(self.data.scfvalues[0]),type(Numeric.array([]))) def testscfvaluedim(self): """Do the scf values have the right dimensions?""" Modified: trunk/test/testSPun.py =================================================================== --- trunk/test/testSPun.py 2006-05-24 18:20:44 UTC (rev 155) +++ trunk/test/testSPun.py 2006-05-24 19:16:00 UTC (rev 156) @@ -1,9 +1,12 @@ -import os, unittest -from Numeric import array +import os +import unittest +import bettertest +import Numeric + from testall import getfile from cclib.parser import ADF, GAMESS, Gaussian, Jaguar -class GenericSPunTest(unittest.TestCase): +class GenericSPunTest(bettertest.TestCase): """Restricted single point calculations with MO coeffs and overlap info.""" def testdimaooverlaps(self): """Are the dims of the overlap matrix consistent with nbasis?""" @@ -14,9 +17,8 @@ self.assertEquals(self.data.mocoeffs.shape,(2,self.data.nmo,self.data.nbasis)) def testhomos(self): - """What are the homos?""" - self.assertEquals(type(self.data.homos),type(array([]))) - self.assertEquals(self.data.homos,array([34,33],"i")) + """Are the homos correct?""" + self.assertArrayEquals(self.data.homos,Numeric.array([34,33],"i"),"%s != array([34,33],'i')" % Numeric.array_repr(self.data.homos)) class GaussianSPunTest(GenericSPunTest): def setUp(self): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |