fix(wafer): derive family sensor counts from YAML layouts, bound frame decode to layout
This commit is contained in:
+23
-10
@@ -1,4 +1,8 @@
|
||||
"""Tests for the shared wafer family sensor-count lookup."""
|
||||
"""Tests for the shared wafer family sensor-count lookup.
|
||||
|
||||
Real counts, one per YAML layout file — this is the ground truth every
|
||||
caller (streaming decode, NVRAM parsing, CSV column count) must agree on.
|
||||
"""
|
||||
from pygui.backend.wafer.family_spec import sensor_count_for
|
||||
|
||||
|
||||
@@ -6,18 +10,27 @@ def test_x_family_returns_80():
|
||||
assert sensor_count_for("X") == 80
|
||||
|
||||
|
||||
def test_p_family_returns_244():
|
||||
assert sensor_count_for("P") == 244
|
||||
def test_aep_family_returns_48():
|
||||
for code in ("A", "E", "P"):
|
||||
assert sensor_count_for(code) == 48
|
||||
|
||||
|
||||
def test_other_known_families_return_244():
|
||||
for code in ("A", "B", "C", "D", "E", "F"):
|
||||
assert sensor_count_for(code) == 244
|
||||
def test_bcd_family_returns_29():
|
||||
for code in ("B", "C", "D"):
|
||||
assert sensor_count_for(code) == 29
|
||||
|
||||
|
||||
def test_unknown_family_returns_244():
|
||||
assert sensor_count_for("Z") == 244
|
||||
def test_f_family_returns_22():
|
||||
assert sensor_count_for("F") == 22
|
||||
|
||||
|
||||
def test_empty_string_returns_244():
|
||||
assert sensor_count_for("") == 244
|
||||
def test_z_family_returns_65():
|
||||
assert sensor_count_for("Z") == 65
|
||||
|
||||
|
||||
def test_unknown_family_returns_zero():
|
||||
assert sensor_count_for("Q") == 0
|
||||
|
||||
|
||||
def test_empty_string_returns_zero():
|
||||
assert sensor_count_for("") == 0
|
||||
|
||||
Reference in New Issue
Block a user