Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"""Tests for src/pygui/backend/wafer_layouts.py."""
|
||||
import pytest
|
||||
from pygui.backend.wafer_layouts import load_layout, available_families
|
||||
from pygui.backend.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")
|
||||
Reference in New Issue
Block a user