@@ -630,17 +630,22 @@ def test_resample_base(self):
630
630
self .assertTrue (resampled .index .equals (exp_rng ))
631
631
632
632
def test_resample_base_with_timedeltaindex (self ):
633
+ print "my tests"
633
634
rng = timedelta_range (start = '0s' , periods = 25 , freq = 's' )
634
635
ts = Series (np .random .randn (len (rng )), index = rng )
635
636
636
- with_base = ts .resample ('10s ' , base = 5 )
637
- without_base = ts .resample ('10s ' )
637
+ with_base = ts .resample ('2s ' , base = 5 )
638
+ without_base = ts .resample ('2s ' )
638
639
639
- exp_without_base = timedelta_range (start = '0s' , end = '25s' , freq = '10s ' )
640
- exp_with_base = timedelta_range (start = '5s ' , end = '25s' , freq = '10s ' )
640
+ exp_without_base = timedelta_range (start = '0s' , end = '25s' , freq = '2s ' )
641
+ exp_with_base = timedelta_range (start = '10s ' , end = '25s' , freq = '2s ' )
641
642
643
+ print "exp_with_base: " , exp_with_base
644
+ print "with_base: " , with_base .index
645
+
646
+ self .assertTrue (without_base .index .equals (exp_without_base ))
642
647
self .assertTrue (with_base .index .equals (exp_with_base ))
643
- self . assertTrue ( without_base . index . equal ( exp_without_base ))
648
+
644
649
645
650
def test_resample_daily_anchored (self ):
646
651
rng = date_range ('1/1/2000 0:00:00' , periods = 10000 , freq = 'T' )
0 commit comments