コード例 #1
0
ファイル: motor.py プロジェクト: UManPychron/pychron
class MotionProfilerTest(unittest.TestCase):
    def setUp(self):
        self.mp = MotionProfiler()
        self.mpold = MotionProfilerOld()

    def testCheckParameters2(self):
        displacement = 100
        mv, mac, mdc = 0.1, 10, 10
        args = self.mp.calculate_corrected_parameters(0, displacement,
                                                        mac, mdc)
#         print args2

        print 'new', self.mp.calculate_transit_parameters(displacement, *args)
        argsold = self.mpold.calculate_corrected_parameters(displacement,
                                                       mv, mac, mdc)

        print 'old', self.mpold.calculate_transit_parameters(displacement, *argsold)
#         print nv, na, nd
#         print args1
#         print self.mp.calculate_transit_parameters(displacement, *args1)

        self.assertTupleEqual(args, argsold)
コード例 #2
0
class MotionProfilerTest(unittest.TestCase):
    def setUp(self):
        self.mp = MotionProfiler()
        self.mpold = MotionProfilerOld()

    def testCheckParameters2(self):
        displacement = 100
        mv, mac, mdc = 0.1, 10, 10
        args = self.mp.calculate_corrected_parameters(0, displacement, mac,
                                                      mdc)
        #         print args2

        print 'new', self.mp.calculate_transit_parameters(displacement, *args)
        argsold = self.mpold.calculate_corrected_parameters(
            displacement, mv, mac, mdc)

        print 'old', self.mpold.calculate_transit_parameters(
            displacement, *argsold)
        #         print nv, na, nd
        #         print args1
        #         print self.mp.calculate_transit_parameters(displacement, *args1)

        self.assertTupleEqual(args, argsold)
コード例 #3
0
 def setUp(self):
     self.mp = MotionProfiler()
     self.mpold = MotionProfilerOld()
コード例 #4
0
ファイル: motor.py プロジェクト: UManPychron/pychron
 def setUp(self):
     self.mp = MotionProfiler()
     self.mpold = MotionProfilerOld()