示例#1
0
 def simulate(self):
     goal_met = False
     while not goal_met:
         self.month += 1
         goal_met = self._step_forward()
     # TODO: Construct and save final report
     UI.end(self.month)
示例#2
0
 def test_end__singular_labels(self, mock_heading, mock_print):
     UI.end(total_months=13)
     mock_heading.assert_called_once_with(ANY, level=1)
     mock_print.assert_any_call('Goal achieved in 1 year and 1 month.\n')
示例#3
0
 def test_end__pluaral_labels(self, mock_heading, mock_print):
     UI.end(total_months=27)
     mock_heading.assert_called_once_with(ANY, level=1)
     mock_print.assert_any_call('Goal achieved in 2 years and 3 months.\n')