mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-10-03 04:31:28 +02:00
The two TestBroadcastStatusChange / TestEndToEndUnderRunningLoop tests patch printer_state_to_dict to return a fixed dict, but on parallel xdist runners (CI's pytest -n 30) the patch occasionally didn't catch the call and the real function ran against the 4-field SimpleNamespace fake — first attr access (.kprofiles) AttributeError'd, swallowed by the try/except in _broadcast_status_change, send_status never awaited, the assertion failed. Filled _fake_state with every attribute the real printer_state_to_dict reads (iterables empty, scalars None, stg_cur=0 for the int comparison in get_derived_status_name). Test now passes whether or not the patch lands.