(month_label, month_int, multiple, offset_str)
| 300 | @pytest.mark.parametrize("offset_str", ["QS", "Q", "QE"]) |
| 301 | @pytest.mark.filterwarnings("ignore::FutureWarning") # Deprecation of "Q" etc. |
| 302 | def test_to_offset_quarter(month_label, month_int, multiple, offset_str): |
| 303 | freq = offset_str |
| 304 | offset_type = _QUARTER_OFFSET_TYPES[offset_str] |
| 305 | if month_label: |
| 306 | freq = f"{freq}-{month_label}" |
| 307 | if multiple: |
| 308 | freq = f"{multiple}{freq}" |
| 309 | result = to_offset(freq) |
| 310 | |
| 311 | if multiple and month_int: |
| 312 | expected = offset_type(n=multiple, month=month_int) |
| 313 | elif multiple: |
| 314 | if month_int: |
| 315 | expected = offset_type(n=multiple) |
| 316 | elif offset_type == QuarterBegin: |
| 317 | expected = offset_type(n=multiple, month=1) |
| 318 | elif offset_type == QuarterEnd: |
| 319 | expected = offset_type(n=multiple, month=12) |
| 320 | elif month_int: |
| 321 | expected = offset_type(month=month_int) |
| 322 | elif offset_type == QuarterBegin: |
| 323 | expected = offset_type(month=1) |
| 324 | elif offset_type == QuarterEnd: |
| 325 | expected = offset_type(month=12) |
| 326 | assert result == expected |
| 327 | |
| 328 | |
| 329 | @pytest.mark.parametrize("freq", ["Z", "7min2", "AM", "M-", "AS-", "QS-", "1H1min"]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…