Skip to content

Commit ea18e16

Browse files
committed
fix: clear repricing lru_cache in fixture teardown
This fixes a CI failure
1 parent 333e144 commit ea18e16

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

packages/testing/src/execution_testing/forks/tests/test_gas_repricing.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Tests for gas repricing override mechanism."""
22

33
import json
4+
from collections.abc import Generator
45
from pathlib import Path
56

67
import pytest
@@ -17,10 +18,14 @@
1718

1819

1920
@pytest.fixture(autouse=True)
20-
def _clear_repricing_cache(monkeypatch: pytest.MonkeyPatch) -> None:
21-
"""Clear the lru_cache and env var before each test."""
21+
def _clear_repricing_cache(
22+
monkeypatch: pytest.MonkeyPatch,
23+
) -> Generator[None, None, None]:
24+
"""Clear the lru_cache and env var before and after each test."""
2225
load_repricing_config.cache_clear()
2326
monkeypatch.delenv(_ENV_VAR, raising=False)
27+
yield
28+
load_repricing_config.cache_clear()
2429

2530

2631
def _default_osaka_costs() -> GasCosts:

0 commit comments

Comments
 (0)