Skip to content

Commit 6f68feb

Browse files
committed
Updated tests for resampling fix
1 parent ab2d598 commit 6f68feb

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

pandas/tseries/tests/test_resample.py

+10-5
Original file line numberDiff line numberDiff line change
@@ -630,17 +630,22 @@ def test_resample_base(self):
630630
self.assertTrue(resampled.index.equals(exp_rng))
631631

632632
def test_resample_base_with_timedeltaindex(self):
633+
print "my tests"
633634
rng = timedelta_range(start = '0s', periods = 25, freq = 's')
634635
ts = Series(np.random.randn(len(rng)), index = rng)
635636

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')
638639

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')
641642

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))
642647
self.assertTrue(with_base.index.equals(exp_with_base))
643-
self.assertTrue(without_base.index.equal(exp_without_base))
648+
644649

645650
def test_resample_daily_anchored(self):
646651
rng = date_range('1/1/2000 0:00:00', periods=10000, freq='T')

0 commit comments

Comments
 (0)