Exemplo n.º 1
0
 def test_usr_enddate_converts_to_saturday(self):
     this_day = ss.saturdays(end_date='1976-09-19')[-1]
     assert datetime.strptime(this_day, self.fmt).weekday() == 5
Exemplo n.º 2
0
 def test_return_iterable(self):
     assert (i for i in ss.saturdays())
Exemplo n.º 3
0
 def test_usr_startdate_converts_to_saturday(self):
     this_day = ss.saturdays('1990-05-16')[0]
     assert datetime.strptime(this_day, self.fmt).weekday() == 5
Exemplo n.º 4
0
 def test_saturday_before_end(self):
     end = '2013-11-01'
     sat = ss.saturdays(end_date='2013-11-01')
     assert sat[0] < '2013-11-01' and \
            datetime.strptime(sat[0], self.fmt).weekday() == 5
Exemplo n.º 5
0
 def test_enddate_is_saturday(self):
     assert datetime.strptime(ss.saturdays()[-1], self.fmt).weekday() == 5
Exemplo n.º 6
0
 def test_saturday_after_start(self):
     sat = ss.saturdays(start_date='2013-11-03')
     assert sat[0] > '2013-11-03' and \
            datetime.strptime(sat[0], self.fmt).weekday() == 5
Exemplo n.º 7
0
 def test_non_empty(self):
     assert len(ss.saturdays()) > 0