Esempio n. 1
0
 def test_today_datetime(self):
     frequency = Frequency(4,
                           Frequency.UNIT.HOUR,
                           Frequency.TYPE.PER,
                           dateformat=Frequency.DATEFORMAT.DATETIME)
     self.assertEqual(type(frequency.today()),
                      type(datetime.datetime.today()))
Esempio n. 2
0
 def test_today_monthday(self):
     frequency = Frequency(4,
                           Frequency.UNIT.HOUR,
                           Frequency.TYPE.PER,
                           dateformat=Frequency.DATEFORMAT.MONTHDAY)
     self.assertEqual(type(frequency.today()), type(datetime.date.today()))
Esempio n. 3
0
 def test_frequency_8days(self):
     freq8 = Frequency(1, '8days', 'e', dateformat=None)
     print(freq8.today())
     print(freq8.get_next_date(freq8.today(), '8days', 1))
     self.assertEqual(freq8.dateformat, 'YYYYMMDD')