test(iomodbus): tighten channels-kit kind assertion; note catalog channel count

This commit is contained in:
2026-06-11 15:46:22 -04:00
parent cac403a502
commit 51db84f161

View File

@@ -34,7 +34,7 @@ def test_column_kinds_follow_the_headings(qtbot, catalog):
qtbot.addWidget(win)
_scan_select(ctrl)
tab = win.channels_tab
assert tab.delegate._kinds.get(0) in (None, CellKind.TEXT) # name column
assert tab.delegate._kinds.get(0) == CellKind.TEXT # name column
assert tab.delegate._kinds.get(1) == CellKind.NUMERIC # value column
serial_col = ctrl.state.heading_column("Serial #")
if serial_col >= 0:
@@ -49,7 +49,7 @@ def test_summary_counts_channels(qtbot, catalog):
labels = [
s.text() for s in win.channels_tab.summary._segments if s.objectName() == "SummaryItem"
]
assert any("8 CHANNELS" in t for t in labels)
assert any("8 CHANNELS" in t for t in labels) # "CS-05 (new)" has 8 catalog channels
def test_edit_marks_pending_and_echo_resolves(qtbot, catalog):