Skip to content

test: remove duplicate client tests and fix base URL coverage - #4170

Draft
dpiet-oai wants to merge 1 commit into
mainfrom
dpiet/project-fast-ci-03-python-client-test-cleanup
Draft

dpiet-oai wants to merge 1 commit into
mainfrom
dpiet/project-fast-ci-03-python-client-test-cleanup

Conversation

@dpiet-oai

Copy link
Copy Markdown
Contributor

Changes being requested

Remove three tests in TestAsyncOpenAI that use the synchronous OpenAI fixture and repeat the corresponding TestOpenAI assertions for extra JSON, headers, and query parameters. Correct the standard and custom HTTP client inputs in both no-trailing-slash tests so they actually exercise base URLs without a trailing slash.

Additional context & links

  • Full changed file: 292 passed, 2 skipped; Ruff lint and format checks passed.
  • Focused selection: 14 cases before, 11 after. Three sequential local runs per revision on Python 3.10 with one pytest process had median wall time of 2.96 s before and 3.05 s after; the timing does not demonstrate a speedup.

@github-actions

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: 43045fcaf91aec08571e54c57706597cefd32d45.

Trusted main policy: 43045fcaf91aec08571e54c57706597cefd32d45.

✅ No new custom-code files detected.

0 mixed files remain; 0 existing customizations changed.

Compared 43045fcaf91a → d92a22cb2272. Generated baselines verified.

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 40028664785 --repo openai/openai-python \
  --name castiron-custom-code-40028664785-1 --dir /tmp/castiron-custom-code-40028664785-1
git apply --stat /tmp/castiron-custom-code-40028664785-1/custom-code.patch
cat /tmp/castiron-custom-code-40028664785-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin 43045fcaf91aec08571e54c57706597cefd32d45 d92a22cb2272d4aac80a0d6cfa41ac7152e08d74
python3 scripts/castiron/custom_code_report.py report \
  --base 43045fcaf91aec08571e54c57706597cefd32d45 \
  --head d92a22cb2272d4aac80a0d6cfa41ac7152e08d74 --target-branch main --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-d92a22cb2272
cat /tmp/castiron-custom-code-d92a22cb2272/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@marcuswood-oai marcuswood-oai 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.

LGTM 👍 No changes requested.


Reviewed: d92a22c · Base: 43045fc · sdk-pr-review

@markstuart-oai markstuart-oai 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.

Reviewed d92a22cb2272d4aac80a0d6cfa41ac7152e08d74. No blocking findings. The three removed tests duplicate retained synchronous client coverage. The corrected inputs now exercise base URLs without a trailing slash for both synchronous and asynchronous clients, including custom HTTP clients.

Source-only review; I did not run candidate code or tests. Hosted checks: 22 successful and 13 skipped.

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.

3 participants