def test_handle_request_pre_season() -> None: start_dt, end_dt = sanitize_date_range('2019-03-01', '2019-03-22') result = _handle_request(start_dt, end_dt, step=1, verbose=False) assert result is not None assert not result.empty assert len(result.columns) == CURRENT_SC_COLUMNS assert len(result) > 0
def test_handle_request_post_season() -> None: start_dt, end_dt = sanitize_date_range('2018-11-14', '2019-03-22') result = _handle_request(start_dt, end_dt, step=1, verbose=False) assert result is not None assert not result.empty assert len(result.columns) == 89 assert len(result) == 689
def test_handle_request_post_season() -> None: start_dt, end_dt = sanitize_date_range('2018-11-14', '2019-03-22') with pytest.warns(UserWarning): result = _handle_request(start_dt, end_dt, step=1, verbose=False) assert result is not None assert not result.empty assert len(result.columns) == CURRENT_SC_COLUMNS assert len(result) > 0
def test_handle_request_post_season_same_year() -> None: start_dt, end_dt = sanitize_date_range('2018-11-14', '2018-11-30') result = _handle_request(start_dt, end_dt, step=1, verbose=False) assert result is not None assert result.empty