Skip to content

Commit

Permalink
Try doing the reset afterwards and see what the result is then.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyandrewmeyer committed Mar 28, 2024
1 parent fe171d7 commit d305f85
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ops/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,6 @@ def emit(self, source: 'framework.BoundEvent', *args: Any, forget_charm=True, **
# harness.charm.x = foo; harness.something_that_emits()? Probably that
# should be invalid because you can't really do that in practice?

# Prepare for another emit().
if forget_charm:
self._forget_charm()
self.make_charm()

# Re-emit any deferred events from the previous run.
self.framework.reemit()

Expand All @@ -315,6 +310,11 @@ def emit(self, source: 'framework.BoundEvent', *args: Any, forget_charm=True, **
# Emit pre-commit, commit, and save the snapshot.
self._commit()

# Prepare for another emit().
if forget_charm:
self._forget_charm()
self.make_charm()


# noinspection PyProtectedMember
class Harness(Generic[CharmType]):
Expand Down

0 comments on commit d305f85

Please sign in to comment.