Make the test suite deterministic on Windows and proxied environments
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- ci-cd, operating-systems, testing-qa
Research direction
Start with tests/test_transform.py:424 and the proxy cases in tests/test_client.py:996 and tests/test_client.py:1936, then run the documented pytest command on Windows. Check pyproject.toml for the advertised operating systems and the repository’s CI configuration. Done means the core suite passes without host proxy settings or line-ending differences, with Windows coverage added if the CI configuration supports it.
Written by the indexing model from the issue text.
Description
Description
The unit suite is not portable to a supported Windows checkout. On Windows with normal Git CRLF conversion and common proxy environment variables, four otherwise-local tests fail.
Reproduction
On Windows/Python 3.12 after installing the dev dependencies:
python -m pytest -q -n 0 -k "not aiohttp"
Observed failures:
tests/test_transform.py:424(sync and async):tests/sample_file.txtis checked out with CRLF, producingSGVsbG8sIHdvcmxkIQ0K; the assertion hard-codes LF bytes (SGVsbG8sIHdvcmxkIQo=).tests/test_client.py:996andtests/test_client.py:1936: the proxy tests expect one mount after settingHTTP_PROXY, but inheritedNO_PROXY/proxy environment state can cause httpx to produce zero matching mounts.
Result from this audit: 4 failed, 1072 passed, 2 skipped after excluding the separately parameterized aiohttp cases. The remaining suite passes.
Expected behavior
Tests should pass on every OS advertised in pyproject.toml (Operating System :: Microsoft :: Windows) and should isolate themselves from host proxy variables and line-ending conversion.
Suggested fixes:
- Make
sample_file.txtbinary-stable via.gitattributes, or derive the expected base64 from the file bytes rather than a hard-coded newline convention. - Clear all relevant proxy/no-proxy environment variables in the proxy tests before setting the values under test.
- Add a Windows CI job, at least for the core unit suite.
Why it matters
Windows contributors currently cannot get a clean test run from an unmodified checkout, and the Linux-only CI matrix cannot catch these regressions.
- Dominant language
- Python
- Stars
- 93
- Forks
- 16
- Avg merge
- 11m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from browserbase/sdk-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
browserbase/sdk-python#182 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
browserbase/sdk-python#180 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
browserbase/sdk-python#179 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
browserbase/sdk-python#178 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
browserbase/sdk-python#176 ·
All issues in browserbase/sdk-python
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·