Exemple #1
0
 def test_empty(self):
     self.assertEqual(None, timekeeper.duration_stats([]))
Exemple #2
0
 def test_one(self):
     self.assertEqual((1, 1, 1, 0), timekeeper.duration_stats([1]))
Exemple #3
0
 def test_range(self):
     stats = timekeeper.duration_stats(list(range(10)))
     self.assertEqual(0, stats[0])
     self.assertEqual(9, stats[1])
     self.assertTrue(abs(4.5 - stats[2]) < 0.001)
     self.assertTrue(abs(2.8722 - stats[3]) < 0.001)