mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-16 02:12:01 +00:00
The tests were making real API calls instead of using mocks because conftest.py reloads litellm at module scope, causing the HTTPHandler class reference in the HuggingFace embedding handler to become stale. The patches were applied to the new class, but the handler used the old one. Fix: Add a reload_huggingface_modules fixture that reloads the relevant modules BEFORE the mock fixtures apply their patches. This ensures all references point to the same class object.
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/test_litellm
This folder can only run mock tests.