Ejemplo n.º 1
0
 def testMultipleCalcs(self):
   " testing calculation of multiple descriptors "
   for i in xrange(len(self.cExprs)):
     cExpr= self.cExprs[i]
     argVect = self.piece1 + [cExpr]
     res = Parser.CalcMultipleCompoundsDescriptor([self.compos,self.compos],argVect,
                                                 self.aDict,[self.pDict,self.pDict])
     self.assertAlmostEqual(res[0],self.results[i],2)
     self.assertAlmostEqual(res[1],self.results[i],2)
Ejemplo n.º 2
0
 def testMultipleCalcs(self):
     " testing calculation of multiple descriptors "
     for i in xrange(len(self.cExprs)):
         cExpr = self.cExprs[i]
         argVect = self.piece1 + [cExpr]
         res = Parser.CalcMultipleCompoundsDescriptor(
             [self.compos, self.compos], argVect, self.aDict,
             [self.pDict, self.pDict])
         assert abs(res[0] - self.results[i]
                    ) < self.tol, 'Expression %s failed' % (cExpr)
         assert abs(res[1] - self.results[i]
                    ) < self.tol, 'Expression %s failed' % (cExpr)