22 lines
630 B
Python
22 lines
630 B
Python
"""Tests for src/pygui/backend/wafer_layouts.py."""
|
|
import pytest
|
|
from pygui.backend.wafer.wafer_layouts import load_layout, available_families
|
|
from pygui.backend.wafer.zwafer_models import Sensor
|
|
|
|
|
|
def test_lists_bundled_families():
|
|
fams = available_families()
|
|
assert "aep" in fams and "x" in fams
|
|
|
|
|
|
def test_loads_sensors_in_mm():
|
|
sensors = load_layout("aep")
|
|
assert sensors and all(isinstance(s, Sensor) for s in sensors)
|
|
assert any(s.x < 0 for s in sensors)
|
|
assert max(abs(s.x) for s in sensors) < 200.0
|
|
|
|
|
|
def test_unknown_family_raises():
|
|
with pytest.raises(KeyError):
|
|
load_layout("nope")
|