-
Notifications
You must be signed in to change notification settings - Fork 837
refactor(python): move tests into python/tests/ directory #448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 20 changed files in this pull request and generated no new comments.
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.