The widgets are added to the virtual DMD as expected on the mode_attract_started event but not removed on mode_attract_stopped. The following integration test passes against my widget_player config globally, but fails when moving the config into the context of a specific mode. I could be missing something obvious, but this seems to relate to #144. This is a pretty specific case as we're using both the virtual DMD and named widgets.
def test_attract_mode(self):
# verify widget is on the DMD
current_widgets = self.get_dmd_text_widgets()
self.assertIn('Pinball Plaid', [x.text for x in current_widgets])
# stop the mode and verify the widget has been removed
self.hit_and_release_switch("s_start") # triggers the attract mode stop event
self.advance_time_and_run()
current_widgets = self.get_dmd_text_widgets()
self.assertNotIn('Pinball Plaid', [x.text for x in current_widgets]) # << FAILS
def get_dmd_text_widgets(self):
current_widgets = []
virtual_dmd = self.mc.displays['dmd'].\
children[0].children[0]
for widget in virtual_dmd.children:
if hasattr(widget, 'text'): current_widgets.append(widget)
return current_widgets
The widgets are added to the virtual DMD as expected on the
mode_attract_started
event but not removed onmode_attract_stopped
. The following integration test passes against mywidget_player
config globally, but fails when moving the config into the context of a specific mode. I could be missing something obvious, but this seems to relate to #144. This is a pretty specific case as we're using both the virtual DMD and named widgets.Attract Mode Config
Integration test:
Error:
AssertionError: 'Pinball Plaid' unexpectedly found in ['Ball: 1', '', '', '', '00', 'P1:', 'Player: 1', '0,000,000', 'Zaccaria “Combat”', 'Pinball Plaid', 'Reimagined by:']