Skip to content

Commit ab478d6

Browse files
committed
Adjust to clean test base
1 parent 0c13839 commit ab478d6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

openfisca_core/simulations/simulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,10 @@ def invalidate_cache_entry(self, variable: str, period):
418418
def invalidate_spiral_variables(self, variable: str):
419419
invalidate_entries = False
420420
for frame in self.tracer.stack:
421+
if not invalidate_entries and frame["name"] == variable:
422+
invalidate_entries = True
421423
if invalidate_entries:
422424
self.invalidate_cache_entry(str(frame["name"]), frame["period"])
423-
elif frame["name"] == variable:
424-
invalidate_entries = True
425425

426426
# ----- Methods to access stored values ----- #
427427

tests/core/test_tracers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
TracingParameterNodeAtInstant,
1919
)
2020

21-
2221
from .parameters_fancy_indexing.test_fancy_indexing import parameters
2322

2423

@@ -30,6 +29,7 @@ class StubSimulation(Simulation):
3029
def __init__(self):
3130
self.exception = None
3231
self.max_spiral_loops = 1
32+
self.max_spiral_lookback_months = 0
3333
self.invalidated_cache_items = []
3434

3535
def _calculate(self, variable, period):

0 commit comments

Comments
 (0)