Skip to content

test: cover python session workspace and destroy APIs#818

Closed
haosenwang1018 wants to merge 1 commit intogithub:mainfrom
haosenwang1018:test/python-session-workspace-and-destroy
Closed

test: cover python session workspace and destroy APIs#818
haosenwang1018 wants to merge 1 commit intogithub:mainfrom
haosenwang1018:test/python-session-workspace-and-destroy

Conversation

@haosenwang1018
Copy link

Summary

  • add a Python client test that asserts create_session() exposes session.workspace_path
  • add a Python client test that verifies deprecated session.destroy() warns and forwards to session.destroy RPC cleanup

Why

Issue #809 calls out three public CopilotSession APIs that were effectively unused in tests. set_model() already had request-shape coverage, but workspace_path and deprecated destroy() still had no client-level validation. This PR closes that gap without changing runtime behavior.

Validation

  • python -m pytest -q python/test_client.py -k 'workspace_path or destroy_warns'
  • git diff --check

@haosenwang1018 haosenwang1018 requested a review from a team as a code owner March 13, 2026 05:59
@SteveSandersonMS
Copy link
Contributor

Thanks @haosenwang1018 for submitting all these PRs with test coverage.

As it stands these are not something we would merge because:

  1. They only cover Python, and we need to cover all the languages we support. Making the test suites diverge significantly will make it harder to keep the languages in sync.
  2. They are largely mock-oriented, which is not the test pattern we're trying to focus on. Using mocks means we're locking down internal implementation details instead of observing the true behavior. For tests that describe interactions with the underlying CLI server, we would prefer to use the E2E test infrastructure. This also helps to ensure we're only testing things that can actually happen in reality.

If you're interested in working with us on test coverage that's wonderful and I'd be happy to discuss more. I'd recommend not submitting large numbers of PRs without coordination though as we are really focused on keeping the project moving and we won't necessarily have capacity to review and merge things that are not on our roadmap.

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.

2 participants