We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 333e144 commit ea18e16Copy full SHA for ea18e16
1 file changed
packages/testing/src/execution_testing/forks/tests/test_gas_repricing.py
@@ -1,6 +1,7 @@
1
"""Tests for gas repricing override mechanism."""
2
3
import json
4
+from collections.abc import Generator
5
from pathlib import Path
6
7
import pytest
@@ -17,10 +18,14 @@
17
18
19
20
@pytest.fixture(autouse=True)
-def _clear_repricing_cache(monkeypatch: pytest.MonkeyPatch) -> None:
21
- """Clear the lru_cache and env var before each test."""
+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."""
25
load_repricing_config.cache_clear()
26
monkeypatch.delenv(_ENV_VAR, raising=False)
27
+ yield
28
+ load_repricing_config.cache_clear()
29
30
31
def _default_osaka_costs() -> GasCosts:
0 commit comments