def test_01_0_Days(self): """ Date is within DayOfWeek value """ l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY) self.assertEqual(l_days, 0) self.m_schedule_obj.DayOfWeek = DayOfWeek_WEDNESDAY l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY) # print(PrettyFormatAny.form(l_days, 'B1-01-A - Days')) self.assertEqual(l_days, 0)
def test_02_1_Day(self): """ Date will be tomorrow """ self.m_schedule_obj.DayOfWeek = DayOfWeek_THURSDAY l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY) self.assertEqual(l_days, 1) self.m_schedule_obj.DayOfWeek = 127 - DayOfWeek_WEDNESDAY l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY) # print(PrettyFormatAny.form(l_days, 'B1-02-A - Days')) self.assertEqual(l_days, 1)
def test_08_7_PlusDays(self): """ Date will be Never """ self.m_schedule_obj.DayOfWeek = 0 l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY) # print(PrettyFormatAny.form(l_days, 'B1-08-A - Days')) self.assertEqual(l_days, 10)
def test_07_6_Days(self): """ Date will be in 6 days """ self.m_schedule_obj.DayOfWeek = DayOfWeek_TUESDAY l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY) # print(PrettyFormatAny.form(l_days, 'B1-07-A - Days')) self.assertEqual(l_days, 6)