예제 #1
0
 def testIgnoreFixed(self):
     seq = SvSequence([0, (500, 1.5, True), 1000])
     seq.normalizeTo(inplace=True, ignoreFixed=True)
     self.assertAlmostEqual(seq[0].multiplier, 0.8)
     self.assertAlmostEqual(seq[1].multiplier, 1.2)
예제 #2
0
 def testGeneric(self):
     seq = SvSequence([0, (500, 1.5, True), 1000])
     seq.normalizeTo(inplace=True)
     self.assertAlmostEqual(seq[0].multiplier, 0.5)
예제 #3
0
 def testComplex(self):
     seq = SvSequence([0, (500, 1.5, True), (700, 0.75, True), (800, 1.5, False), 1000])
     seq.normalizeTo(inplace=True)
     self.assertAlmostEqual(seq[0].multiplier, 0.78125)
     self.assertAlmostEqual(seq[3].multiplier, 1.171875)