test(api): move fine-tuning positional tests out of generated code (#3706)
- [x] I understand that this repository is auto-generated and my pull request may not be merged ## Changes being requested Keep the fine-tuning positional-argument regression coverage in handwritten tests, then restore the two generated test files to the recorded public generated snapshot. The generated examples use `fine_tuning_job_id=` and their original fake `after` values; the original positional calls remain tested. Only three test files change. Runtime code, dependencies, the API reference, compiler inputs, and generation metadata are unchanged. ## Additional context & links All 20 original methods and their client parameterizations are retained verbatim in [`tests/lib/test_fine_tuning_positional_arguments.py`](https://github.com/openai/openai-python/blob/4dd138db112ee8d02c6803e0f0b812c5c9be3dee/tests/lib/test_fine_tuning_positional_arguments.py): - [`TestCheckpoints`](https://github.com/openai/openai-python/blob/4dd138db112ee8d02c6803e0f0b812c5c9be3dee/tests/lib/test_fine_tuning_positional_arguments.py#L14) and [`TestAsyncCheckpoints`](https://github.com/openai/openai-python/blob/4dd138db112ee8d02c6803e0f0b812c5c9be3dee/tests/lib/test_fine_tuning_positional_arguments.py#L65) preserve `test_method_list`, `test_method_list_with_all_params`, `test_raw_response_list`, `test_streaming_response_list`, and `test_path_params_list`. - [`TestJobs`](https://github.com/openai/openai-python/blob/4dd138db112ee8d02c6803e0f0b812c5c9be3dee/tests/lib/test_fine_tuning_positional_arguments.py#L118) and [`TestAsyncJobs`](https://github.com/openai/openai-python/blob/4dd138db112ee8d02c6803e0f0b812c5c9be3dee/tests/lib/test_fine_tuning_positional_arguments.py#L169) preserve `test_method_list_events`, `test_method_list_events_with_all_params`, `test_raw_response_list_events`, `test_streaming_response_list_events`, and `test_path_params_list_events`. These retain the basic/all-parameter calls, parsed response types, raw/streaming response headers and close behavior, and empty-ID errors. The original loose, strict, and async aiohttp modes remain: **50 positional-call cases**, alongside the restored generated keyword-call examples. Validation: - Exact-source/AST proof for every retained method and parameterization; both generated files match the public snapshot byte-for-byte. - Pytest collection preserves all 50 original class/function/client-mode IDs after normalizing only the destination path, under both Pydantic versions. - `python -m pytest -n 0 tests/lib/test_fine_tuning_positional_arguments.py tests/api_resources/fine_tuning/jobs/test_checkpoints.py tests/api_resources/fine_tuning/test_jobs.py`: **220 passed under Pydantic v2 and 220 under v1**, against the checked-in API mock. - `./scripts/format` and `./scripts/lint` pass, including Ruff, Pyright, mypy, and import checks. Unrelated reporter-only formatting changes are excluded. - Verified public custom-code report: **40 → 38 mixed files**, exactly these two generated test customizations removed, and all other customizations unchanged.
A
Alex Chang committed
eb909d30c6c4f6f4508a708bd8ca61c70a13cee7
Parent: e14ac34
Committed by GitHub <noreply@github.com>
on 8/21/2026, 3:54:21 AM