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

Function test_round

xarray/tests/test_cftimeindex.py:1373–1382  ·  view source on GitHub ↗
(rounding_index, date_type)

Source from the content-addressed store, hash-verified

1371
1372@requires_cftime
1373def test_round(rounding_index, date_type):
1374 result = rounding_index.round("s")
1375 expected = xr.CFTimeIndex(
1376 [
1377 date_type(1, 1, 1, 2, 0, 0, 0),
1378 date_type(1, 1, 1, 3, 0, 2, 0),
1379 date_type(1, 1, 1, 7, 0, 6, 0),
1380 ]
1381 )
1382 assert result.equals(expected)
1383
1384
1385@requires_cftime

Callers

nothing calls this directly

Calls 3

date_typeFunction · 0.85
roundMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…