(shape)
| 873 | @requires_cftime |
| 874 | @pytest.mark.parametrize("shape", [(24,), (8, 3), (2, 4, 3)]) |
| 875 | def test_encode_cf_datetime_overflow(shape) -> None: |
| 876 | # Test for fix to GH 2272 |
| 877 | dates = pd.date_range("2100", periods=24).values.reshape(shape) |
| 878 | units = "days since 1800-01-01" |
| 879 | calendar = "standard" |
| 880 | |
| 881 | num, _, _ = encode_cf_datetime(dates, units, calendar) |
| 882 | roundtrip = decode_cf_datetime(num, units, calendar) |
| 883 | np.testing.assert_array_equal(dates, roundtrip) |
| 884 | |
| 885 | |
| 886 | def test_encode_expected_failures() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…