Skip to content

Commit 4e0b00d

Browse files
committed
parametrize test, and a note to v3.0.0
1 parent a9f4bb3 commit 4e0b00d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ Datetimelike
456456
- Bug in :func:`tseries.api.guess_datetime_format` would fail to infer time format when "%Y" == "%H%M" (:issue:`57452`)
457457
- Bug in :meth:`DatetimeIndex.is_year_start` and :meth:`DatetimeIndex.is_quarter_start` does not raise on Custom business days frequencies bigger then "1C" (:issue:`58664`)
458458
- Bug in :meth:`DatetimeIndex.is_year_start` and :meth:`DatetimeIndex.is_quarter_start` returning ``False`` on double-digit frequencies (:issue:`58523`)
459+
- Bug in :meth:`DatetimeIndex.is_year_start` and :meth:`DatetimeIndex.is_quarter_start` where using Business month begin frequency (:issue:`58729`)
459460
- Bug in setting scalar values with mismatched resolution into arrays with non-nanosecond ``datetime64``, ``timedelta64`` or :class:`DatetimeTZDtype` incorrectly truncating those scalars (:issue:`56410`)
460461

461462
Timedelta

pandas/tests/indexes/datetimes/test_scalar_compat.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,11 @@ def test_dti_is_year_start_freq_custom_business_day_with_digit(self):
344344
with pytest.raises(ValueError, match=msg):
345345
dr.is_year_start
346346

347-
def test_dti_is_year_start_freq_business_month_start_with(self):
348-
dr = date_range("2020-01-01", periods=1, freq="BMS")
347+
@pytest.mark.parametrize("freq", ["BMS", offsets.BusinessMonthBegin()])
348+
def test_dti_is_year_quarter_start_freq_business_month_begin(self, freq):
349+
# GH#58729
350+
dr = date_range("2020-01-01", periods=1, freq=freq)
349351
assert all(dr.is_year_start)
352+
353+
dr = date_range("2020-01-01", periods=1, freq=freq)
354+
assert all(dr.is_quarter_start)

0 commit comments

Comments
 (0)