Ejemplo n.º 1
0
 def test_calculate_points_4expecy_equals_1verify(self):
     stats = QueryStatistics()
     stats.count = 100
     stats.hits = 50
     stats.win = 98
     points1 = calculate_points(stats, 1)
     stats.win = 102
     points2 = calculate_points(stats, 0)
     self.assertEquals(points1, points2)
Ejemplo n.º 2
0
 def test_calculate_points_performance_with_verify(self):
     stats = QueryStatistics()
     stats.count = 200
     stats.hits = 164
     points = calculate_points(stats, 3)
     self.assertEquals(points, 170)
Ejemplo n.º 3
0
 def test_calculate_points_mid_performance(self):
     stats = QueryStatistics()
     stats.count = 100
     stats.hits = 52
     points = calculate_points(stats, 0)
     self.assertEquals(points, 104)
Ejemplo n.º 4
0
 def test_calculate_points_full_performance(self):
     stats = QueryStatistics()
     stats.count = 300
     stats.hits = 300
     points = calculate_points(stats, 0)
     self.assertEquals(points, 200)
Ejemplo n.º 5
0
 def test_calculate_points_empty_stats_with_verify(self):
     stats = QueryStatistics()
     points = calculate_points(stats, 9)
     self.assertEquals(points, 18)