Exemple #1
0
 def testEvalMany(self):
     s = segment.FitSet([self.a, self.b])
     for x, expectedy in zip([1.5, 2.5], [1.5, 1.5]):
         self.assertAlmostEqual(s.eval(x), expectedy, 2,
                                "Evaluation with multiple fits failed")
Exemple #2
0
 def testAppend(self):
     s = segment.FitSet([self.a])
     self.assertTrue(len(s) == 1, "Construction failed to add one element")
     s.append(self.b)
     self.assertTrue(len(s) == 2, "Append failed to add one element")
Exemple #3
0
 def testEvalSingle(self):
     s = segment.FitSet([self.a])
     self.assertAlmostEqual(s.eval(1.5), 1.5, 2,
                            "Evaluation at single point failed")
Exemple #4
0
 def testInit(self):
     s = segment.FitSet()