Skip to content

Conversation

@dinmukhamedm
Copy link
Member

@dinmukhamedm dinmukhamedm commented Nov 17, 2025

Note

Convert Claude Agent instrumentation tests to native async tests using pytest-asyncio, removing asyncio.run wrappers and inlining async contexts/loops.

  • Tests (Claude Agent instrumentation):
    • Migrate to pytest.mark.asyncio with async def tests in tests/test_instrumentations/test_claude_agent/*.
      • Replace asyncio.run(...) wrappers with inline async with and async for usage of ClaudeSDKClient and query streams.
      • Remove unused asyncio imports; add pytest imports where needed.
    • Preserve existing span assertions and behaviors for query, alias query, SDK client flows, and tool interactions.

Written by Cursor Bugbot for commit d41d3d8. This will update automatically on new commits. Configure here.


Important

Update test cases to use pytest.mark.asyncio for async testing in claude_agent_sdk tests.

  • Testing:
    • Replace asyncio.run() with @pytest.mark.asyncio in test_claude_sdk_client.py, test_query.py, test_query_with_alias.py, and test_tool.py.
    • Update test functions to be directly asynchronous, removing nested async functions.
  • Imports:
    • Remove import asyncio from all affected test files.

This description was created by Ellipsis for d41d3d8. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to d41d3d8 in 1 minute and 9 seconds. Click for details.
  • Reviewed 189 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. tests/test_instrumentations/test_claude_agent/test_claude_sdk_client.py:9
  • Draft comment:
    Good use of @pytest.mark.asyncio replacing asyncio.run; improves async test handling.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it praises the use of @pytest.mark.asyncio without providing any actionable feedback or suggestions. It does not align with the rules, which prohibit purely informative comments.
2. tests/test_instrumentations/test_claude_agent/test_query.py:18
  • Draft comment:
    If the loop variable 'message' is unused, consider using '_' for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
3. tests/test_instrumentations/test_claude_agent/test_query_with_alias.py:17
  • Draft comment:
    Consider renaming the unused variable 'message' to '_' for consistency.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
4. tests/test_instrumentations/test_claude_agent/test_tool.py:34
  • Draft comment:
    Consistent use of @pytest.mark.asyncio and async context improves test readability.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative and does not provide any actionable feedback or suggestions for improvement. It simply praises the use of a specific testing pattern without offering any constructive criticism or questions.

Workflow ID: wflow_jqjSGNp0CD3Z4VY2

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@dinmukhamedm dinmukhamedm merged commit a0790af into main Nov 17, 2025
8 checks passed
@dinmukhamedm dinmukhamedm deleted the fix/cas-tests branch November 17, 2025 22:57
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.

3 participants