From 435569568eaddfac010fa75b6399251e42b34123 Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Mon, 20 May 2024 10:35:09 +0200 Subject: [PATCH] use lru_cache during tests --- tests/helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/helper.py b/tests/helper.py index 0d2c834..e37e283 100644 --- a/tests/helper.py +++ b/tests/helper.py @@ -8,7 +8,7 @@ from __future__ import annotations -from functools import cache +from functools import lru_cache import numpy as np import xarray as xr @@ -47,7 +47,7 @@ def is_3d_rmse_better(result, obsp, simp) -> bool: return (rmse_values_new_ds < rmse_values_old_ds).all() -@cache +@lru_cache(maxsize=None) def get_datasets(kind: str) -> tuple[xr.Dataset, xr.Dataset, xr.Dataset, xr.Dataset]: historical_time = xr.cftime_range( "1971-01-01",