fix: add starlette/httpx to dev deps, guard test_openai_compat imports #2

Merged
nsatoshi merged 1 commits from devin/1777359479-fix-openai-compat-tests into main 2026-04-28 08:19:13 +00:00
Owner

Summary

Fixes the test_openai_compat.py collection error (ModuleNotFoundError: No module named starlette).

Changes:

  • Added starlette>=0.36 and httpx>=0.27 to dev dependencies in pyproject.toml
  • Added pytest.importorskip() guards for both starlette and fastapi in test_openai_compat.py — test file is skipped gracefully when those packages are missing instead of crashing the entire test collection
  • Fixed import sorting (ruff I001)

Result: 340 tests pass (was 325 with test_openai_compat excluded).

Review & Testing Checklist for Human

  • Run pip install -e ".[dev]" and verify starlette/httpx are pulled in
  • Run pytest tests/ without --ignore — all 340 tests should pass

Notes

The 20 warnings in test output are FastAPI deprecation warnings about on_event — pre-existing, not related to this change.

## Summary Fixes the `test_openai_compat.py` collection error (`ModuleNotFoundError: No module named starlette`). **Changes:** - Added `starlette>=0.36` and `httpx>=0.27` to `dev` dependencies in `pyproject.toml` - Added `pytest.importorskip()` guards for both `starlette` and `fastapi` in `test_openai_compat.py` — test file is skipped gracefully when those packages are missing instead of crashing the entire test collection - Fixed import sorting (ruff I001) **Result:** 340 tests pass (was 325 with test_openai_compat excluded). ## Review & Testing Checklist for Human - [ ] Run `pip install -e ".[dev]"` and verify starlette/httpx are pulled in - [ ] Run `pytest tests/` without `--ignore` — all 340 tests should pass ### Notes The 20 warnings in test output are FastAPI deprecation warnings about `on_event` — pre-existing, not related to this change.
nsatoshi added 1 commit 2026-04-28 06:58:22 +00:00
fix: add starlette/httpx to dev deps, guard test_openai_compat imports
Some checks failed
Tests / test (3.10) (pull_request) Failing after 40s
Tests / test (3.11) (pull_request) Failing after 36s
Tests / test (3.12) (pull_request) Successful in 41s
Tests / lint (pull_request) Successful in 34s
Tests / docker (pull_request) Successful in 1m47s
59d57cb2fb
- Add starlette>=0.36 and httpx>=0.27 to dev dependencies so
  test_openai_compat.py can run in dev environments
- Add pytest.importorskip guards for starlette and fastapi so the
  test file is skipped gracefully when those packages are missing
- Fix import sorting (ruff I001)

340 tests now pass (was 325 with test_openai_compat skipped).

Co-Authored-By: Nakamoto, S <defi@defi-oracle.io>
nsatoshi merged commit de97fd8ac9 into main 2026-04-28 08:19:13 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: d-bis/FusionAGI#2