replace pyserial-asyncio with pyserial-asyncio-fast#178
Merged
Conversation
Contributor
|
Thanks! This needs one tiny patch to get CI passing again, it hasn't run in a while: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2b1f0c2..84ac791 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,8 +11,6 @@ jobs:
with:
CODE_FOLDER: zigpy_xbee
CACHE_VERSION: 2
- PYTHON_VERSION_DEFAULT: 3.9.15
- PRE_COMMIT_CACHE_PATH: ~/.cache/pre-commit
MINIMUM_COVERAGE_PERCENTAGE: 100
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
Contributor
|
Looks like a few tests now fail due to asyncio changes in 3.14. This should do the trick: diff --git a/tests/test_api.py b/tests/test_api.py
index 48768e1..a366a81 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -323,7 +323,7 @@ def _handle_at_response(api, tsn, status, at_response=b""):
return response
-def test_handle_at_response_none(api):
+async def test_handle_at_response_none(api):
"""Test AT successful response with no value."""
tsn = 123
fut = _handle_at_response(api, tsn, 0)
@@ -332,7 +332,7 @@ def test_handle_at_response_none(api):
assert fut.exception() is None
-def test_handle_at_response_data(api):
+async def test_handle_at_response_data(api):
"""Test AT successful response with data."""
tsn = 123
status, response = 0, 0x23
@@ -342,7 +342,7 @@ def test_handle_at_response_data(api):
assert fut.exception() is None
-def test_handle_at_response_error(api):
+async def test_handle_at_response_error(api):
"""Test AT unsuccessful response."""
tsn = 123
status, response = 1, 0x23
@@ -351,7 +351,7 @@ def test_handle_at_response_error(api):
assert isinstance(fut.exception(), ATCommandError)
-def test_handle_at_response_invalid_command(api):
+async def test_handle_at_response_invalid_command(api):
"""Test invalid AT command response."""
tsn = 123
status, response = 2, 0x23
@@ -360,7 +360,7 @@ def test_handle_at_response_invalid_command(api):
assert isinstance(fut.exception(), InvalidCommand)
-def test_handle_at_response_undef_error(api):
+async def test_handle_at_response_undef_error(api):
"""Test AT unsuccessful response with undefined error."""
tsn = 123
status, response = 0xEE, 0x23
@@ -482,7 +482,7 @@ def test_handle_tx_status_duplicate(api):
assert send_fut.set_exception.call_count == 0
-def test_handle_registration_status(api):
+async def test_handle_registration_status(api):
"""Test device registration status."""
frame_id = 0x12
status = xbee_t.RegistrationStatus.SUCCESS
@@ -526,7 +526,7 @@ async def test_command_mode_at_cmd_timeout(api):
assert result is None
-def test_handle_command_mode_rsp(api):
+async def test_handle_command_mode_rsp(api):
"""Test command mode response."""
api._cmd_mode_future = None
data = "OK" |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #178 +/- ##
=======================================
Coverage ? 100.00%
=======================================
Files ? 7
Lines ? 718
Branches ? 0
=======================================
Hits ? 718
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Thanks! |
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.
No description provided.