Skip to content

Commit

Permalink
utils: clear state on exit
Browse files Browse the repository at this point in the history
Otherwise host utils will have lingering state from previous test runs.
  • Loading branch information
pbrezina committed Oct 31, 2024
1 parent 6f75db6 commit 2c2969f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pytest_mh/_private/multihost.py
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,8 @@ def mh_utility_exit_dependencies(obj: MultihostRole | MultihostHost, where: str)
except Exception as e:
errors.append(e)

util._op_state.clear(f"__enter__{where}")

if errors:
raise TeardownExceptionGroup("Unable to exit some utilities (util.__exit__)", errors)

Expand Down

0 comments on commit 2c2969f

Please sign in to comment.