Skip to content

Refactor test cases to simplify async context management and improve readability#108

Merged
dcloud347 merged 1 commit into
mainfrom
dev
Aug 11, 2025
Merged

Refactor test cases to simplify async context management and improve readability#108
dcloud347 merged 1 commit into
mainfrom
dev

Conversation

@dcloud347

@dcloud347 dcloud347 commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

This pull request updates the test suite to improve compatibility with pytest's asyncio support and simplifies the usage of test fixtures. The most important changes are the removal of unnecessary @pytest.mark.asyncio decorators and the refactoring of test fixture usage from asynchronous iteration to direct unpacking, making the tests cleaner and easier to read.

Pytest configuration improvements:

  • Enabled automatic asyncio mode in pytest.ini by adding asyncio_mode = auto, ensuring better handling of async tests without explicit decorators.

Test fixture usage simplification:

Decorator cleanup:

  • Removed unnecessary @pytest.mark.asyncio decorators from async test functions, relying on the new pytest configuration for async test support. [1] [2] [3]

Minor code formatting improvements:

  • Simplified code formatting in test message lists and assertion blocks for clarity and consistency. [1] [2]

These changes collectively make the test suite easier to maintain and ensure proper execution of async tests with pytest.

@dcloud347 dcloud347 merged commit 7f7d43d into main Aug 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant