test: drop aiounittest in favor of stdlib IsolatedAsyncioTestCase#919
Open
sarteta wants to merge 1 commit intotwilio:mainfrom
Open
test: drop aiounittest in favor of stdlib IsolatedAsyncioTestCase#919sarteta wants to merge 1 commit intotwilio:mainfrom
sarteta wants to merge 1 commit intotwilio:mainfrom
Conversation
Fixes twilio#916. aiounittest hasn't had a release since 2022 and doesn't support Python 3.14 (kwarunek/aiounittest#28), which was breaking the test suite build on 3.14. unittest.IsolatedAsyncioTestCase has been in the stdlib since Python 3.8 and is a drop-in replacement for aiounittest.AsyncTestCase, so this is just an import swap. Changes: - tests/requirements.txt: remove aiounittest - tests/unit/http/test_async_http_client.py - tests/unit/rest/test_client.py - tests/unit/base/test_version.py Tested locally on Python 3.13 (Windows): 620 unit tests pass, including the 71 previously-async tests in the three files touched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #916.
aiounittesthas had no release since 2022 and the maintainer has confirmed it won't get Python 3.14 support (kwarunek/aiounittest#28), which was blocking the test suite on 3.14.Everything the test suite uses from
aiounittest— specificallyaiounittest.AsyncTestCase— has been in the stdlib since Python 3.8 asunittest.IsolatedAsyncioTestCase. The API is identical for our use:async def test_*methods +setUp/tearDown, no custom event-loop handling needed. So this is a straight import swap, no test-method changes.Changes
tests/requirements.txt— removeaiounittesttests/unit/http/test_async_http_client.py— 3 classestests/unit/rest/test_client.py— 1 classtests/unit/base/test_version.py— 1 classLocal verification
Python 3.13 on Windows (3.14 not installed locally, but the substitution is a superset —
IsolatedAsyncioTestCaseworks on 3.8+):The 71 tests in the three touched files (
TestAsyncHttpClientRequest,TestAsyncHttpClientRetries,TestAsyncHttpClientSession,TestClientAsyncRequest,AsyncVersionTestCase) all pass.