MCPcopy
hub / github.com/pydata/xarray / test_decode_abbreviation

Function test_decode_abbreviation

xarray/tests/test_coding_times.py:456–464  ·  view source on GitHub ↗

Test making sure we properly fall back to cftime on abbreviated units.

()

Source from the content-addressed store, hash-verified

454
455@requires_cftime
456def test_decode_abbreviation() -> None:
457 """Test making sure we properly fall back to cftime on abbreviated units."""
458 import cftime
459
460 val = np.array([1586628000000.0])
461 units = "msecs since 1970-01-01T00:00:00Z"
462 actual = decode_cf_datetime(val, units)
463 expected = cftime_to_nptime(cftime.num2date(val, units))
464 assert_array_equal(actual, expected)
465
466
467@arm_xfail

Callers

nothing calls this directly

Calls 2

decode_cf_datetimeFunction · 0.90
cftime_to_nptimeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…