From ab69b0d234f020d6217e1eb819ff40583d33b114 Mon Sep 17 00:00:00 2001 From: emanuel-schmid Date: Thu, 30 Nov 2023 16:21:25 +0100 Subject: [PATCH] remove 'v' prefix before comparison --- climada/test/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/climada/test/__init__.py b/climada/test/__init__.py index b08783952..1d0575795 100755 --- a/climada/test/__init__.py +++ b/climada/test/__init__.py @@ -49,7 +49,7 @@ def get_test_file(ds_name, file_format=None): test_ds = [ds for ds in sorted( client.list_dataset_infos(name=ds_name, status='test_dataset', version='ANY'), key=lambda ds: ds.version - ) if ds.version <= climada_version][-1] + ) if ds.version.strip('v') <= climada_version.strip('v')][-1] _, files = client.download_dataset(test_ds) [test_file] = [fil for fil in files if fil.name in [ dsf.file_name