litellm/tests/load_tests
ryan-crabbe-berri e9d40a8f73 test: enforce F811 so a duplicate definition cannot silently replace the first
A name bound twice keeps only the second binding. In `tests/` that is nearly
always a repeated import, harmless but misleading, and the same rule is what
catches the cases that are not harmless: a local that shadows an import the
module still calls, and a second `def test_x` that quietly replaces the first.

311 of the 344 sites were repeated imports and came out with ruff's own fix.
The remaining 33 needed a decision. Four modules imported a name they never
used because a local definition below already shadowed it. Two comprehensions
bound `call` over `unittest.mock.call`, which those modules import and use.
One test rebound the two module handles its nested reload closure had captured.
One class attribute shadowed an unused `status` import.

The load-test fixtures move to a conftest, which is how pytest is meant to share
them, so the test module no longer imports three fixture names it never calls.
The nine `prisma_client` parameters keep a narrow `noqa`: pytest resolves that
fixture by name before the body runs, so the parameter never shadows anything.
2026-08-21 12:06:19 -07:00
..
conftest.py test: enforce F811 so a duplicate definition cannot silently replace the first 2026-08-21 12:06:19 -07:00
memory_leak_utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_datadog_load_test.py test: update tests to new deployment model (#10142) 2025-04-18 14:22:12 -07:00
test_langsmith_load_test.py fix langsmith load tests 2024-09-11 21:19:03 -07:00
test_linear_memory_growth.py test: enforce F811 so a duplicate definition cannot silently replace the first 2026-08-21 12:06:19 -07:00
test_memory_usage.py test: enforce F811 so a duplicate definition cannot silently replace the first 2026-08-21 12:06:19 -07:00
test_otel_load_test.py test: update tests to new deployment model (#10142) 2025-04-18 14:22:12 -07:00
test_vertex_embeddings_load_test.py test: test_embedding_performance 2025-05-14 21:31:07 -07:00
test_vertex_load_tests.py vertex testing use pathrise-convert-1606954137718 2025-01-05 14:00:17 -08:00
vertex_key.json test: update to new vertex ai keys 2026-03-28 20:19:05 -07:00