Ejemplo n.º 1
0
 def test_surrounding_milestones_equal(self):
     """
     If the amount is equal to one of the milestones, return that
     amount as the previous milestone.
     """
     eq_(MilestoneDisplay.surrounding_milestones(5, [3, 5, 8, 10, 15]),
         (5, 8))
Ejemplo n.º 2
0
 def test_surrounding_milestones_last_prev(self):
     """
     If the amount is greater than all the milestones, return None
     for the next milestone.
     """
     eq_(MilestoneDisplay.surrounding_milestones(25, [8, 10, 15]),
         (15, None))
Ejemplo n.º 3
0
 def test_surrounding_milestones_equal(self):
     """
     If the amount is equal to one of the milestones, return that
     amount as the previous milestone.
     """
     eq_(MilestoneDisplay.surrounding_milestones(5, [3, 5, 8, 10, 15]), (5, 8))
Ejemplo n.º 4
0
 def test_surrounding_milestones_last_prev(self):
     """
     If the amount is greater than all the milestones, return None
     for the next milestone.
     """
     eq_(MilestoneDisplay.surrounding_milestones(25, [8, 10, 15]), (15, None))
Ejemplo n.º 5
0
 def test_surrounding_milestones_first_next(self):
     """
     If the amount is smaller than all the milestones, return None
     for the previous milestone.
     """
     eq_(MilestoneDisplay.surrounding_milestones(5, [8, 10, 15]), (None, 8))
Ejemplo n.º 6
0
 def test_surrounding_milestones(self):
     eq_(MilestoneDisplay.surrounding_milestones(5, [1, 3, 4, 6, 7]), (4, 6))
Ejemplo n.º 7
0
 def test_surrounding_milestones_first_next(self):
     """
     If the amount is smaller than all the milestones, return None
     for the previous milestone.
     """
     eq_(MilestoneDisplay.surrounding_milestones(5, [8, 10, 15]), (None, 8))
Ejemplo n.º 8
0
 def test_surrounding_milestones(self):
     eq_(MilestoneDisplay.surrounding_milestones(5, [1, 3, 4, 6, 7]),
         (4, 6))