Skip to content

test(python): make browser path assertions portable - #2739

Open
abhinavkr26104 wants to merge 1 commit into
browserbase:mainfrom
abhinavkr26104:test/python-windows-paths
Open

abhinavkr26104 wants to merge 1 commit into
browserbase:mainfrom
abhinavkr26104:test/python-windows-paths

Conversation

@abhinavkr26104

@abhinavkr26104 abhinavkr26104 commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

why

Two Python browser tests compared native filesystem paths to hard-coded POSIX strings. Valid Windows paths therefore failed the SDK test gate even though the production browser code correctly preserved the platform-native representation.

Fixes #2733

what changed

  • Reuse the caller's Path conversion when asserting the forwarded downloads path and CDP command.
  • Compare the packaged extension directory by its final path components instead of slash-delimited string suffixes.
  • Keep production code unchanged; this is a test-portability correction only.

test plan

  • pytest tests/test_browser.py (32 passed on Windows)
  • Full Python SDK suite (457 passed, 2 skipped on Windows)
  • Generated-model freshness check
  • Ruff format check
  • Ruff lint check
  • git diff --check
  • ty check was attempted; it reaches one unrelated pre-existing Windows diagnostic for os.mkfifo in tests/test_locator.py.

Summary by cubic

Makes Python browser tests path-portable so Windows passes. Previously tests compared hard-coded POSIX strings; now they use the caller’s Path and path components. No production behavior changes.

Review notes

  • Assert downloads_path via str(downloads_path) and mirror that in the CDP command payload.
  • Validate the packaged extension directory by its last two path components instead of a slash-delimited suffix.
  • Only packages/sdk-python/tests/test_browser.py changed.

Rollout

  • Tests only; no migration or configuration changes.

Written for commit 1cdd93f. Summary will update on new commits.

Review in cubic

@changeset-bot

changeset-bot Bot commented Aug 15, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1cdd93f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

This branch has not been deployed

No deployments
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.

Python SDK browser tests use POSIX-only path assertions on Windows

1 participant