MCPcopy Index your code
hub / github.com/pydata/xarray / test_cftimeindex_calendar_repr

Function test_cftimeindex_calendar_repr

xarray/tests/test_cftimeindex.py:1101–1106  ·  view source on GitHub ↗

Test that cftimeindex has calendar property in repr.

(calendar, expected)

Source from the content-addressed store, hash-verified

1099 ],
1100)
1101def test_cftimeindex_calendar_repr(calendar, expected):
1102 """Test that cftimeindex has calendar property in repr."""
1103 index = xr.date_range(start="2000", periods=3, calendar=calendar, use_cftime=True)
1104 repr_str = index.__repr__()
1105 assert f" calendar='{expected}'" in repr_str
1106 assert "2000-01-01 00:00:00, 2000-01-02 00:00:00" in repr_str
1107
1108
1109@requires_cftime

Callers

nothing calls this directly

Calls 1

__repr__Method · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…