def testSingleCalcs(self): " testing calculation of a single descriptor " for i in xrange(len(self.cExprs)): cExpr= self.cExprs[i] argVect = self.piece1 + [cExpr] res = Parser.CalcSingleCompoundDescriptor(self.compos,argVect,self.aDict,self.pDict) self.assertAlmostEqual(res,self.results[i],2)
def testSingleCalcs(self): " testing calculation of a single descriptor " for i in xrange(len(self.cExprs)): cExpr = self.cExprs[i] argVect = self.piece1 + [cExpr] res = Parser.CalcSingleCompoundDescriptor(self.compos, argVect, self.aDict, self.pDict) assert abs(res - self.results[i] ) < self.tol, 'Expression %s failed' % (cExpr)