Skip to content

Commit

Permalink
tests: make cleanup_loop error more informative
Browse files Browse the repository at this point in the history
Include content of the selector map when it's non-empty, to ease finding
what got leaked.
  • Loading branch information
marmarek committed Aug 23, 2024
1 parent a10a0b5 commit c6cd538
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion qubes/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,9 @@ def cleanup_loop(self):
# lifecycle, and it is unwatched only at loop.close(); so we cannot just
# check selector for non-emptiness
assert len(self.loop._selector.get_map()) \
== int(self.loop._ssock is not None)
== int(self.loop._ssock is not None), \
f"unexpected selector map entries: " \
f"{dict(self.loop._selector.get_map())!r}"

del self.loop

Expand Down

0 comments on commit c6cd538

Please sign in to comment.