Convert Async unit tests from unittest.TestCase to unittest.IsolatedAsyncioTestCase #711
Labels
good first issue
Good for newcomers
Low Hanging Fruit
This should not take a lot of time
Low Priority
This should not take the place of more important work
refactor
Code Cleanup and Restructuring
We have several unit tests floating about that test async functionality by manually handling an event loop. These tests should be run via async functions within IsolatedAsyncioTestCase classes rather than the standard TestCase that we're defaulting to.
There's a function I've got locally that's failure when called locally. The unit test looks like:
If an IsolatedAsyncioTestCase were used, it could just be:
There are other places where tests fail due to event loops being closed. Letting the unit tests handle this behavior natively rather than relying on our own implementations would help prevent/fix issues involved with just running the tests in the first place.
The text was updated successfully, but these errors were encountered: