From 4ac62cbb5bc56167adc0ed5e8a0503c6274e3e7b Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sat, 3 Oct 2026 18:51:32 -0400 Subject: [PATCH] Forward all storage arguments in the read-only cache test fixture policyengine-core 3.32.16 calls InMemoryStorage.put(..., derived=...). The fixture replaced put and get with fixed signatures, so five code-health tests failed with an unexpected keyword argument on every PR, because CI installs the latest core. The fixture now forwards every argument. Co-Authored-By: Claude Opus 5.5 --- .../test_cached_arrays_not_written_in_place.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/policyengine_uk/tests/code_health/test_cached_arrays_not_written_in_place.py b/policyengine_uk/tests/code_health/test_cached_arrays_not_written_in_place.py index 321edd943d..374ae085ce 100644 --- a/policyengine_uk/tests/code_health/test_cached_arrays_not_written_in_place.py +++ b/policyengine_uk/tests/code_health/test_cached_arrays_not_written_in_place.py @@ -469,13 +469,15 @@ def read_only_cache(monkeypatch): original_put = InMemoryStorage.put original_get = InMemoryStorage.get - def put(self, value, period, branch_name="default"): + # Forward every argument: storage methods gain keywords between core + # releases (3.32.16 added ``put(..., derived=...)``). + def put(self, value, *args, **kwargs): if isinstance(value, np.ndarray): value.flags.writeable = False - return original_put(self, value, period, branch_name) + return original_put(self, value, *args, **kwargs) - def get(self, period, branch_name="default"): - value = original_get(self, period, branch_name) + def get(self, *args, **kwargs): + value = original_get(self, *args, **kwargs) if isinstance(value, np.ndarray): value.flags.writeable = False return value