Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Replaced tests asserting that the event loop is properly cl…
…osed. Under Python 3.10, the tests raise: "DeprecationWarning: There is no current event loop" This means that the asyncio.get_event_loop does not return any existing loop. It creates a new loop as a side effect instead. Therefore, test_1 and test_3 will always be successful. However, it would be wrong to simply delete the tests without a replacement. Although, we cannot retrieve the default loop with get_event_loop, we can still retrieve it from the event loop policy. The new tests do exactly that and assert that the loop is a different object than in the tests before. Signed-off-by: Michael Seifert <[email protected]>
- Loading branch information