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)
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')
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')