Example #1
0
 def test_02_1_Day(self):
     """Date will be tomorrow
     """
     self.m_schedule_obj.DOW = DOW_THURSDAY
     l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY)
     self.assertEqual(l_days, 1)
     self.m_schedule_obj.DOW = 127 - DOW_WEDNESDAY
     l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY)
     self.assertEqual(l_days, 1)
Example #2
0
 def test_01_0_Days(self):
     """Date is in DOW
     """
     self.m_schedule_obj.DOW = 127
     l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY)
     self.assertEqual(l_days, 0)
     self.m_schedule_obj.DOW = DOW_WEDNESDAY
     l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY)
     self.assertEqual(l_days, 0)
Example #3
0
 def test_02_1_Day(self):
     """Date will be tomorrow
     """
     self.m_schedule_obj.DOW = DOW_THURSDAY
     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)
     self.m_schedule_obj.DOW = 127 - DOW_WEDNESDAY
     l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY)
     self.assertEqual(l_days, 1)
Example #4
0
 def test_01_0_Days(self):
     """Date is in DOW
     """
     self.m_schedule_obj.DOW = 127  # All 7 days in a bit mask
     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)
     self.m_schedule_obj.DOW = DOW_WEDNESDAY
     l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY)
     self.assertEqual(l_days, 0)
Example #5
0
 def test_08_7_PlusDays(self):
     """Date will be Never
     """
     self.m_schedule_obj.DOW = 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)
Example #6
0
 def test_07_6_Days(self):
     """Date will be in 6 days
     """
     self.m_schedule_obj.DOW = DOW_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)
Example #7
0
 def test_08_7_PlusDays(self):
     """Date will be Never
     """
     self.m_schedule_obj.DOW = 0
     l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY)
     self.assertEqual(l_days, 10)
Example #8
0
 def test_07_6_Days(self):
     """Date will be in 6 days
     """
     self.m_schedule_obj.DOW = DOW_TUESDAY
     l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY)
     self.assertEqual(l_days, 6)
Example #9
0
 def test_06_5_Days(self):
     """Date will be in 5 days
     """
     self.m_schedule_obj.DOW = DOW_MONDAY
     l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY)
     self.assertEqual(l_days, 5)
Example #10
0
 def test_04_3_Days(self):
     """Date will be in 3 days
     """
     self.m_schedule_obj.DOW = DOW_SATURDAY
     l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY)
     self.assertEqual(l_days, 3)
Example #11
0
 def test_03_2_Days(self):
     """Date will be in 2 days
     """
     self.m_schedule_obj.DOW = DOW_FRIDAY
     l_days = SchedTime._extract_days(self.m_schedule_obj, T_WEDNESDAY)
     self.assertEqual(l_days, 2)