def test_cftimeindex_freq_in_repr(freq, calendar):
    """Test that cftimeindex has frequency property in repr."""
    index = xr.date_range(
        start="2000", periods=3, freq=freq, calendar=calendar, use_cftime=True
    )
    repr_str = index.__repr__()
    assert f", freq='{freq}'" in repr_str
Test that cftimeindex has frequency property in repr.
xarray/tests/test_cftimeindex.py