Skip to content

Commit dc9cf4f

Browse files
committed
test_between_time_axis uses tuples
1 parent f637b24 commit dc9cf4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tests/frame/test_timeseries.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ def test_between_time_raises(self):
724724
df.between_time(start_time='00:00', end_time='12:00')
725725

726726
@pytest.mark.parametrize('axis', [
727-
(), 'index', 'columns', ('index', 'columns'), 0, 1, (0,1)])
727+
(), ('index',), ('columns',), ('index', 'columns'), (0,), (1,), (0,1)])
728728
def test_between_time_axis(self, axis):
729729
# issue 8839
730730
rng = date_range('1/1/2000', periods=100, freq='10min')
@@ -743,7 +743,7 @@ def test_between_time_axis(self, axis):
743743
assert len(selected) == exp_len
744744

745745
@pytest.mark.parametrize('axis', [
746-
(), 'index', 'columns', ('index', 'columns')])
746+
(), ('index',), ('columns',), ('index', 'columns'), (0,), (1,), (0,1)])
747747
def test_between_time_axis_raises(self, axis):
748748
# issue 8839
749749
rng = date_range('1/1/2000', periods=100, freq='10min')
@@ -752,12 +752,12 @@ def test_between_time_axis_raises(self, axis):
752752
ts = DataFrame(rand_data, index=rng, columns=rng)
753753
stime, etime = ('08:00:00', '09:00:00')
754754

755-
if 'index' not in axis:
755+
if 'index' not in axis and 0 not in axis:
756756
ts.index = mask
757757
pytest.raises(TypeError, ts.between_time, stime, etime)
758758
pytest.raises(TypeError, ts.between_time, stime, etime, axis=0)
759759

760-
if 'columns' not in axis:
760+
if 'columns' not in axis and 1 not in axis:
761761
ts.columns = mask
762762
pytest.raises(TypeError, ts.between_time, stime, etime, axis=1)
763763

0 commit comments

Comments
 (0)