Skip to content

Commit 75362ce

Browse files
committed
TST: Parametrize test_wom_len
1 parent 214e083 commit 75362ce

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/indexes/datetimes/test_date_range.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,12 @@ def test_catch_infinite_loop(self):
236236
pytest.raises(Exception, date_range, datetime(2011, 11, 11),
237237
datetime(2011, 11, 12), freq=offset)
238238

239-
def test_wom_len_one(self):
239+
@pytest.mark.parametrize('periods', (1, 2))
240+
def test_wom_len(self, periods):
240241
# https://github.com/pandas-dev/pandas/issues/20517
241-
res = date_range(start='20110101', periods=1, freq='WOM-1MON')
242-
assert len(res) == 1
242+
res = date_range(start='20110101', periods=periods, freq='WOM-1MON')
243+
assert len(res) == periods
244+
243245

244246
class TestGenRangeGeneration(object):
245247

0 commit comments

Comments
 (0)