Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Sep 26, 2025

This PR cleans up test code by removing unnecessary async keywords from test functions and fixtures that don't actually use any async features.

Changes Made

deepaas/tests/test_cmd.py:

  • Removed async from 5 test functions that only perform synchronous operations like mocking and assertions
  • All these functions test command-line functionality without any awaitable calls

deepaas/tests/test_v2_models.py:

  • Removed async from 8 functions (7 tests + 1 fixture) that don't use await
  • Left 2 functions as async that actually call await w.predict()

Why This Matters

Using async on functions that don't need it:

  • Creates unnecessary complexity and confusion about which tests are actually asynchronous
  • Can lead to performance overhead in test execution
  • Makes the codebase harder to understand for new contributors
  • Goes against Python async/await best practices

Verification

  • All tests continue to pass with identical results (13 passing, 5 failing due to unrelated issues)
  • No functional behavior changed - this is purely a code quality improvement
  • Only functions that genuinely use await statements remain marked as async
Original prompt

Remove async keyword in tests that do not require async features"


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link

@Copilot Copilot AI changed the title [WIP] Remove async keyword in tests that do not require async features" Remove async keyword from tests that don't require async features Sep 26, 2025
@Copilot Copilot AI requested a review from alvarolopez September 26, 2025 12:22
Copilot finished work on behalf of alvarolopez September 26, 2025 12:22
@alvarolopez alvarolopez marked this pull request as ready for review September 29, 2025 09:33
@alvarolopez alvarolopez merged commit d5b9578 into v3-fastapi Sep 29, 2025
12 of 13 checks passed
@alvarolopez alvarolopez deleted the copilot/fix-abede98c-555b-476c-bda1-790a3a73e5ec branch September 29, 2025 09:33
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.

2 participants