예제 #1
0
 def testStepNumber(self):
     "The mfng.steps sould give proper values."
     for range_, Tfactor, steps in self.known_values:
         T0 = .2
         self.assertEqual(mfng.steps(T0, Tfactor, T0 / range_), steps)
         self.assertEqual(mfng.steps(T0, Tfactor, T0 / float(range_)),
                          steps)
예제 #2
0
 def testTfactor(self):
     "The mfng.Tfactor sould give proper values."
     for quotient in (1/10**_ for _ in range(3, 9)):
         for steps in (10**_ for _ in range(3, 9)):
             T0 = .2
             steps_ = mfng.steps(T0, mfng.get_Tfactor(quotient, steps), T0*quotient)
             if (steps-steps_) != 0:
                 print(quotient, steps_)
             self.assertEqual(steps_, steps)
예제 #3
0
 def testTfactor(self):
     "The mfng.Tfactor sould give proper values."
     for quotient in (1 / 10**_ for _ in range(3, 9)):
         for steps in (10**_ for _ in range(3, 9)):
             T0 = .2
             steps_ = mfng.steps(T0, mfng.get_Tfactor(quotient, steps),
                                 T0 * quotient)
             if (steps - steps_) != 0:
                 print(quotient, steps_)
             self.assertEqual(steps_, steps)
예제 #4
0
 def testStepNumber(self):
     "The mfng.steps sould give proper values."
     for range_, Tfactor, steps in self.known_values:
         T0 = .2
         self.assertEqual(mfng.steps(T0, Tfactor, T0/range_), steps)
         self.assertEqual(mfng.steps(T0, Tfactor, T0/float(range_)), steps)