diff --git a/scenario/context.py b/scenario/context.py index bd6628bc..998274fd 100644 --- a/scenario/context.py +++ b/scenario/context.py @@ -563,6 +563,10 @@ def run(self, event: "_Event", state: "State") -> "State": charm will invoke when handling the Event. """ if event.action: + # Create an ActionOutput object now so that there is somewhere to + # store the logs and results while the charm is processing the + # action handler(s). This is not accessible until run() finishes and + # the handlers have finished. self.action_output = ActionOutput() with self._run(event=event, state=state) as ops: ops.emit()