refactor(python): move tests into python/tests/ directory#448
Open
brettcannon wants to merge 3 commits intogithub:mainfrom
Open
refactor(python): move tests into python/tests/ directory#448brettcannon wants to merge 3 commits intogithub:mainfrom
brettcannon wants to merge 3 commits intogithub:mainfrom
Conversation
Relocate all Python unit and E2E test files from python/ and python/e2e/ into python/tests/ and python/tests/e2e/ for better project organization. Update pyproject.toml test paths accordingly.
Contributor
There was a problem hiding this comment.
Pull request overview
Relocates the Python SDK’s unit and E2E tests into python/tests/ (and python/tests/e2e/) and updates pytest configuration so test discovery runs from the new structure.
Changes:
- Moved/added Python unit tests under
python/tests/. - Moved/added Python E2E tests and test harness under
python/tests/e2e/. - Updated
pyproject.tomlpytesttestpathsto discover tests frompython/tests/.
Reviewed changes
Copilot reviewed 1 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| python/pyproject.toml | Updates pytest discovery to run from tests/. |
| python/tests/test_jsonrpc.py | Adds JSON-RPC client unit tests (large payload + short-read coverage). |
| python/tests/test_event_forward_compatibility.py | Adds forward-compat parsing tests for session event types. |
| python/tests/test_client.py | Adds client-focused unit tests (tool call handling, URL/auth option parsing). |
| python/tests/e2e/init.py | Marks E2E tests as a package. |
| python/tests/e2e/conftest.py | Adds shared E2E fixtures and per-test proxy snapshot configuration. |
| python/tests/e2e/test_ask_user.py | E2E coverage for ask_user / user-input callbacks. |
| python/tests/e2e/test_client.py | E2E coverage for client start/stop/status/auth/models behavior. |
| python/tests/e2e/test_compaction.py | E2E coverage for infinite-session compaction events. |
| python/tests/e2e/test_hooks.py | E2E coverage for session hook callbacks (pre/post tool use). |
| python/tests/e2e/test_mcp_and_agents.py | E2E coverage for MCP servers + custom agents config. |
| python/tests/e2e/test_permissions.py | E2E coverage for permission callback behavior. |
| python/tests/e2e/test_session.py | E2E coverage for session lifecycle, streaming, tools, providers, abort, etc. |
| python/tests/e2e/test_skills.py | E2E coverage for skills directories / disabled skills. |
| python/tests/e2e/test_tools.py | E2E coverage for built-in + custom tools and error redaction. |
| python/tests/e2e/test_tools_unit.py | Unit tests for define_tool and _normalize_result. |
| python/tests/e2e/testharness/init.py | Exposes test harness helpers/fixtures as a package API. |
| python/tests/e2e/testharness/context.py | Provides shared E2E context (CLI path, temp dirs, proxy, client). |
| python/tests/e2e/testharness/helper.py | Utility helpers for awaiting events/messages and file I/O in E2E tests. |
| python/tests/e2e/testharness/proxy.py | Starts/stops/configures the shared replay proxy (Node harness server). |
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.
Relocate all Python unit and E2E test files from python/ and python/e2e/ into python/tests/ and python/tests/e2e/ for better project organization. Update pyproject.toml test paths accordingly.