test(sdk): add pty.kill coverage for JS and Python sync/async#1412
test(sdk): add pty.kill coverage for JS and Python sync/async#1412mishushakov wants to merge 2 commits into
Conversation
Covers both return paths of pty.kill(): killing a live PTY (returns true, process confirmed gone) and killing a non-existent PID (returns false). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit 1517a2c. Bugbot is set up for automated code reviews on this repo. Configure here. |
Package ArtifactsBuilt from 9398e60. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-2.28.2-mishushakov-sdk-test-coverage-gaps.0.tgzCLI ( npm install ./e2b-cli-2.11.1-mishushakov-sdk-test-coverage-gaps.0.tgzPython SDK ( pip install ./e2b-2.27.0+mishushakov.sdk.test.coverage.gaps-py3-none-any.whl |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6695754e75
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Async Pty.create requires on_data as a positional argument; without it the test raised TypeError before exercising pty.kill. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds the previously-missing test coverage for
pty.kill(), which was untested across all three SDK implementations despite the rest of the PTY API (create/connect/sendInput/resize) being well covered.Each suite gets two tests covering both return paths of
kill():kill()returnstrue, then confirms the process is gone viakill -0 <pid>(throwsProcessExitError/CommandExitException).kill()returnsfalse, matching the documented not-found behavior.The tests mirror the style of the existing
commands.killtests and were verified to lint cleanly and be discovered by vitest/pytest (full runs require a live sandbox).Files
packages/js-sdk/tests/sandbox/pty/kill.test.tspackages/python-sdk/tests/sync/sandbox_sync/pty/test_pty_kill.pypackages/python-sdk/tests/async/sandbox_async/pty/test_pty_kill.py🤖 Generated with Claude Code