Skip to content

Commit

Permalink
Fix tests for python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarta committed Feb 15, 2023
1 parent bafa70f commit c76965d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions qubesmanager/tests/test_qube_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1464,13 +1464,15 @@ def _run_command_and_process_events(self, command, timeout=5,

if additional_timeout:
(done, pending) = self.loop.run_until_complete(
asyncio.wait({future1, future2}, timeout=timeout,
asyncio.wait({future1,
asyncio.create_task(future2)}, timeout=timeout,
return_when=asyncio.FIRST_COMPLETED))
(done, pending) = self.loop.run_until_complete(
asyncio.wait(pending, timeout=additional_timeout))
else:
(done, pending) = self.loop.run_until_complete(
asyncio.wait({future1, future2}, timeout=timeout))
asyncio.wait({future1,
asyncio.create_task(future2)}, timeout=timeout))

for task in pending:
with contextlib.suppress(asyncio.CancelledError):
Expand Down

0 comments on commit c76965d

Please sign in to comment.