示例#1
0
 def testNormalCase(self):
     self.assertEqual(_linear(0.0, 1.0, 0.0, 2.0), (2.0, 0.0))
示例#2
0
 def testEqualInRanges(self):
     #self.assertRaises(ValueError, linear, 1.0, 1.0, 2.0, 3.0)
     self.assertEqual(_linear(1.0, 1.0, 2.0, 3.0), (0, 2.5))
示例#3
0
 def testEqualOutRanges(self):
     self.assertEqual(_linear(2.0, 3.0, 1.0, 1.0), (0.0, 1.0))