Autorun is now invoked via the display
This fixes a timeout issue with test_demos where autorun would prevent pytest from exiting.
@@ -58,6 +58,13 @@ This method will always be called after setup().
"""
return False
+ def play(self):
+ """
+Called if AUTORUN is enabled.
+If no Display is specified, App.run() is called instead.
+ """
+ self.app.play()
+
DEFAULT_DISPLAY_CLASS = None
@@ -95,8 +102,11 @@ def show(app=None, **config):
display.setup()
# --- Autorun ---
if AUTORUN:
+ if display is None:
app.info('Starting execution because autorun is enabled.')
app.play() # asynchronous call
+ else:
+ display.play()
# --- Show ---
if display is None:
return app
