From 28e85e26056ad7cd3ca686d76cca5e037c347136 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 9 Jan 2024 16:41:39 +0000 Subject: [PATCH] Add clone with headers_only option (take 2) --- tests/test_eccodes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_eccodes.py b/tests/test_eccodes.py index e959277..c5f8a73 100644 --- a/tests/test_eccodes.py +++ b/tests/test_eccodes.py @@ -351,6 +351,9 @@ def test_grib_clone(): def test_grib_clone_headers_only(): + if eccodes.codes_get_api_version(int) < 23400: + print("Test skipped (ecCodes version too old)") + return with open(TEST_GRIB_ERA5_DATA, "rb") as f: msgid1 = eccodes.codes_grib_new_from_file(f) msgid2 = eccodes.codes_clone(msgid1, headers_only=True)