Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Make the test suite deterministic on Windows and proxied environments

Offen
#181 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
python

Rechercherichtung

Beginne mit tests/test_transform.py:424 und den Proxy-Fällen in tests/test_client.py:996 und tests/test_client.py:1936 und führe dann den dokumentierten pytest-Befehl unter Windows aus. Prüfe pyproject.toml auf die angegebenen Betriebssysteme und die CI-Konfiguration des Repositorys. Erledigt ist die Aufgabe, wenn die Kern-Testsuite ohne Host-Proxy-Einstellungen oder Unterschiede bei den Zeilenenden besteht und Windows-Abdeckung hinzugefügt wurde, sofern die CI-Konfiguration dies unterstützt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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:

  1. tests/test_transform.py:424 (sync and async): tests/sample_file.txt is checked out with CRLF, producing SGVsbG8sIHdvcmxkIQ0K; the assertion hard-codes LF bytes (SGVsbG8sIHdvcmxkIQo=).
  2. tests/test_client.py:996 and tests/test_client.py:1936: the proxy tests expect one mount after setting HTTP_PROXY, but inherited NO_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.txt binary-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.

Vorherrschende Sprache
Python
Sterne
94
Forks
17
Ø Merge
13 Min.
Gemergte PRs (30 T.)
3

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus browserbase/sdk-python

Alle Issues in browserbase/sdk-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.