Skip to content

test(python): migrate integration tests to Client/AsyncClient API#997

Merged
rgbkrk merged 1 commit intomainfrom
quill/migrate-python-tests
Mar 20, 2026
Merged

test(python): migrate integration tests to Client/AsyncClient API#997
rgbkrk merged 1 commit intomainfrom
quill/migrate-python-tests

Conversation

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Mar 20, 2026

Summary

Migrates all integration test fixtures and ad-hoc session creation in test_daemon_integration.py from the deprecated Session(notebook_id=...) / AsyncSession(notebook_id=...) constructors to the supported Client / AsyncClient API.

  • Added client and async_client fixtures that pass socket_path directly (no more monkeypatch.setenv)
  • Rewrote session, two_sessions, async_session, two_async_sessions, and conda_inline_session fixtures to use client.create_notebook() / client.join_notebook()
  • Migrated TestOpenNotebook, TestCreateNotebook, TestTrustApproval, and TestAsyncContextManager from Session.open_notebook() / Session.create_notebook() / DaemonClient() to the client fixture
  • Removed import uuid (no longer needed without test-{uuid} notebook IDs)
  • Kept Session() in 4 "not connected" error-path tests (TestPresence) — these intentionally test disconnected session behavior

Net result: -143 lines, +54 lines. No test logic changes — only fixture setup.

Note: Tests that call start_kernel() will need #994 to land first (fixes the "Disconnected from sync task" runtime lifecycle bug). This PR can be rebased after #993 and #994 merge.

Verification

  • TestBasicConnectivity, TestOpenNotebook, TestCreateNotebook, TestTrustApproval pass against a running dev daemon
  • No test-* or async-test-* files created in repo root after running tests
  • Only the 4 intentional Session() error-path tests emit deprecation warnings

Closes #995

PR submitted by @rgbkrk's agent, Quill

…cClient API

Replace deprecated Session(notebook_id=...) and AsyncSession(notebook_id=...)
constructors with Client.create_notebook() / AsyncClient.create_notebook()
throughout the integration test suite. This eliminates deprecation warnings,
prevents autosave file pollution from test-{uuid} notebook IDs, and exercises
the same code paths that real users and the MCP server use.

Closes #995
@github-actions github-actions bot added test Test infrastructure and coverage quill PR authored by Quill Agent 🦆 labels Mar 20, 2026
@rgbkrk rgbkrk merged commit 5e8e362 into main Mar 20, 2026
15 checks passed
@rgbkrk rgbkrk deleted the quill/migrate-python-tests branch March 20, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

quill PR authored by Quill Agent 🦆 test Test infrastructure and coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: migrate integration tests from legacy Session() to Client/AsyncClient API

1 participant