def _year_template(self, planner, for_day): template = "" template += "= %s =\n" % for_day.year template += "\n" template += "\t* [[%s 2013]]\n" % quarter_for_month(for_day.month) template += "\n" template += "CHECKPOINTS:\n" template += planner.checkpoints_year_file.getvalue() template += "\n" template += "AGENDA:\n" template += "\n" template += "YEARLYs:\n" template += planner.periodic_year_file.getvalue() template += "\n" template += "NOTES:\n" template += "\n" template += "\n" template += "TIME SPENT ON PLANNER: " return template
def _quarter_template(self, planner, for_day): template = "" template += "= %s %s =\n" % ( quarter_for_month(for_day.month), for_day.year, ) template += "\n" template += "\t* [[Month of December, 2012]]\n" template += "\n" template += "CHECKPOINTS:\n" template += planner.checkpoints_quarter_file.getvalue() template += "\n" template += "AGENDA:\n" template += "\n" template += "QUARTERLYs:\n" template += planner.periodic_quarter_file.getvalue() template += "\n" template += "NOTES:\n" template += "\n" template += "\n" template += "TIME SPENT ON PLANNER: " return template
def test_month_quarter_month(self, quarter, expected): result = month_for_quarter( quarter_for_month(month_for_quarter(quarter))) assert result == expected
def test_quarter_month_quarter(self, date, expected): result = quarter_for_month( month_for_quarter(quarter_for_month(date.month))) assert result == expected
def test_q4(self, reference_date): result = quarter_for_month(reference_date.month) expected = 'Q4' assert result == expected