'Test iteration over periods (days)'

def testPeriodsDays(self):

    assertEqual = self.assertEqual
    ef = S3TimeSeriesEventFrame(tp_datetime(2011, 1, 5), tp_datetime(2011, 1, 8), slots='days')
    expected = [(tp_datetime(2011, 1, 5), tp_datetime(2011, 1, 6)), (tp_datetime(2011, 1, 6), tp_datetime(2011, 1, 7)), (tp_datetime(2011, 1, 7), tp_datetime(2011, 1, 8))]
    for (i, period) in enumerate(ef):
        assertEqual(period.start, expected[i][0])
        assertEqual(period.end, expected[i][1])
    ef = S3TimeSeriesEventFrame(tp_datetime(2011, 1, 5), tp_datetime(2011, 1, 16), slots='4    days')
    expected = [(tp_datetime(2011, 1, 5), tp_datetime(2011, 1, 9)), (tp_datetime(2011, 1, 9), tp_datetime(2011, 1, 13)), (tp_datetime(2011, 1, 13), tp_datetime(2011, 1, 16))]
    for (i, period) in enumerate(ef):
        assertEqual(period.start, expected[i][0])
        assertEqual(period.end, expected[i][1])
