Exemplo n.º 1
0
 def test_mean(self):
     # Assert iterator mean.
     self.assertEqual(vector.mean([], 0), 0)
     self.assertEqual(vector.mean([1,1.5,2], 3), 1.5)
     self.assertEqual(vector.mean(xrange(4), 4), 1.5)
     print("pattern.vector.mean()")
Exemplo n.º 2
0
 def test_mean(self):
     # Assert iterator mean.
     self.assertEqual(vector.mean([], 0), 0)
     self.assertEqual(vector.mean([1, 1.5, 2], 3), 1.5)
     self.assertEqual(vector.mean(xrange(4), 4), 1.5)
     print "pattern.vector.mean()"