Files
kicad-zone-resistance/conftest.py
T
janik 07ab59baad Adaptive grid on by default; finer auto cell size under it
ADAPTIVE_CELLS defaults to True (dialog checkbox stays; untick or
--no-adaptive for the uniform reference grid). With the adaptive grid
the auto cell sizer targets TARGET_CELLS_ADAPTIVE (8M fine cells,
~2x finer h) since unknowns no longer scale with the fine cell count -
memory of the masks/field arrays is the new bound.

The test suite pins ADAPTIVE_CELLS off via an autouse conftest fixture:
the exact-value tests define the uniform reference grid; adaptive tests
opt in per test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 17:57:12 +07:00

16 lines
469 B
Python

import os
import sys
import pytest
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
@pytest.fixture(autouse=True)
def _uniform_grid_default(monkeypatch):
"""The exact-value test suite is the UNIFORM reference grid; the
adaptive default (config.ADAPTIVE_CELLS = True) is pinned off here.
Adaptive tests opt back in per test via monkeypatch."""
from fill_resistance import config
monkeypatch.setattr(config, "ADAPTIVE_CELLS", False)