Skip to content

Commit

Permalink
Code review tweaks 2
Browse files Browse the repository at this point in the history
  • Loading branch information
benhoyt committed Oct 17, 2023
1 parent dc44df5 commit fa7dd65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ops/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ class CollectStatusEvent(EventBase):
The framework will trigger these events after the hook code runs
successfully (``collect_app_status`` will only be triggered on the leader
unit). If any statuses were added by the event handlers using
unit). If any statuses were added by the event handler using
:meth:`add_status`, the framework will choose the highest-priority status
and set that as the status (application status for ``collect_app_status``,
or unit status for ``collect_unit_status``).
Expand Down
6 changes: 4 additions & 2 deletions ops/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1632,8 +1632,10 @@ def evaluate_status(self) -> None:
statuses were added.
Tests should normally call this and then assert that ``self.model.app.status``
or ``self.model.unit.status`` is the value expected. This method resets the
added statuses before triggering the collect-status events.
or ``self.model.unit.status`` is the value expected.
Evaluation is not "additive"; this method resets the added statuses before
triggering each collect-status event.
"""
self.charm.app._collected_statuses = []
self.charm.unit._collected_statuses = []
Expand Down

0 comments on commit fa7dd65

Please sign in to comment.