fix(wafer): derive family sensor counts from YAML layouts, bound frame decode to layout
This commit is contained in:
@@ -42,8 +42,13 @@ class TestCsvColumnCount:
|
||||
def test_x_family(self):
|
||||
assert csv_column_count("X") == 80
|
||||
|
||||
def test_z_family(self):
|
||||
# Z has a real YAML layout (zwafer.yaml) — not "unknown" like the
|
||||
# old hardcoded table implied by omitting it.
|
||||
assert csv_column_count("Z") == 65
|
||||
|
||||
def test_unknown_family_returns_zero(self):
|
||||
assert csv_column_count("Z") == 0
|
||||
assert csv_column_count("Q") == 0
|
||||
|
||||
def test_empty_string_returns_zero(self):
|
||||
assert csv_column_count("") == 0
|
||||
@@ -134,11 +139,11 @@ class TestParseBinaryData:
|
||||
assert result is not None
|
||||
assert len(result) == 1
|
||||
|
||||
def test_p_family_single_block_row_has_244_sensors(self):
|
||||
def test_p_family_single_block_row_has_48_sensors(self):
|
||||
data = _make_p_block(1)
|
||||
result = parse_binary_data(data, "P")
|
||||
assert result is not None
|
||||
assert len(result[0]) == 244
|
||||
assert len(result[0]) == 48
|
||||
|
||||
def test_p_family_two_blocks_returns_two_rows(self):
|
||||
data = _make_p_block(2)
|
||||
@@ -170,7 +175,7 @@ class TestParseBinaryData:
|
||||
data = _make_p_block(1)
|
||||
result = parse_binary_data(data, "A")
|
||||
assert result is not None
|
||||
assert len(result[0]) == 244
|
||||
assert len(result[0]) == 48
|
||||
|
||||
def test_empty_bytes_returns_empty_list(self):
|
||||
result = parse_binary_data(b"", "P")
|
||||
|
||||
Reference in New Issue
Block a user