示例#1
0
 def testPythagoreanOptNoParams(self):
     '''Testing Pythagorean without optimization and missing parameters...'''
     pyth = Pythagoreans.Pythagorean(self.testdict)
     self.assertRaises(TypeError, pyth.calculatePythagorean, optimize=False)
示例#2
0
 def testPythagenportFONoOptPrediction(self):
     '''Testing PythagenportFO with known predictions...'''
     pyth = Pythagoreans.PythagenportFO(self.testdict)
     pyth.calculatePythagorean(optimize=False, staticParams=[1.5])
     self.assertEqual(pyth.prediction,
                      self.knownPredictions['PythagenportFO'])
示例#3
0
 def testPythagenpatNoOptPower(self):
     '''Testing Pythagenpat with known powers...'''
     pyth = Pythagoreans.Pythagenpat(self.testdict)
     pyth.calculatePythagorean(optimize=False, staticParams=[0.287])
     self.assertEqual(pyth.power, self.knownPowers['Pythagenpat'])
示例#4
0
 def testPythagoreanNoOptPrediction(self):
     '''Testing PythagoreanExpectation with known predictions...'''
     pyth = Pythagoreans.PythagoreanExpectation(self.testdict)
     pyth.calculatePythagorean(optimize=False, staticParams=[2.63])
     self.assertEqual(pyth.prediction, self.knownPredictions['Pythagorean'])