示例#1
0
 def test_2(self):
     rng = list(
         generate_range(start=datetime(2008, 1, 1),
                        end=datetime(2008, 1, 3)))
     expected = [
         datetime(2008, 1, 1),
         datetime(2008, 1, 2),
         datetime(2008, 1, 3)
     ]
     assert rng == expected
示例#2
0
 def test_3(self):
     rng = list(generate_range(start=datetime(2008, 1, 5), end=datetime(2008, 1, 6)))
     expected = []
     assert rng == expected
示例#3
0
 def test_1(self):
     rng = list(generate_range(start=datetime(2009, 3, 25), periods=2))
     expected = [datetime(2009, 3, 25), datetime(2009, 3, 26)]
     assert rng == expected
示例#4
0
 def test_generate_cday(self):
     rng1 = list(generate_range(START, END, offset=CDay()))
     rng2 = list(generate_range(START, END, offset="C"))
     assert rng1 == rng2