mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-05 08:07:05 +00:00
A failing `assert` raises AssertionError, which is an Exception, so an `except Exception` in the same test catches it, the handler returns, and pytest records a pass on exactly the regression the assertion guards. TQ009 finds the 29 tests in the suite shaped that way and seeds the ceiling at the 23 left after this branch. Six of them were in tests/test_litellm/. Narrowing the try to the call and moving the assertions below it turned two of them red: - test_sentry_sample_rate asserted SENTRY_API_SAMPLE_RATE was written back to os.environ, which set_callbacks never does. It now reads the rate off the initialised client, which is where the value actually lands. - test_convert_tool_response_with_url_image downloaded from a host that no longer resolves, and the product swallows a fetch failure, so the skip the author wrote could never fire and the assertion failure it caught instead read as a network skip. The download is now served from a stubbed transport, so the media path runs offline and deterministically. Also stops two sentry tests leaking a MagicMock into sys.modules, and derives the budget-coverage test's rule set from the checker instead of a literal list that goes stale on every new rule. |
||
|---|---|---|
| .. | ||
| adaptive_router_demo | ||
| health_check | ||
| benchmark_anthropic_messages_perf.py | ||
| benchmark_chat_completions_perf.py | ||
| benchmark_mock.py | ||
| benchmark_model_response_creator.py | ||
| benchmark_proxy_vs_provider.py | ||
| benchmark_streaming_chunk_overhead.py | ||
| budget_ratchet_check.py | ||
| check_test_quality.py | ||
| check_type_discipline.py | ||
| create_litellm_branch.ps1 | ||
| create_litellm_branch.sh | ||
| create_team_key_and_submit_guardrail.sh | ||
| eval_compression.py | ||
| gate_slot_lock.py | ||
| install-cli.sh | ||
| install.sh | ||
| install_git_hooks.sh | ||
| mock_bedrock_passthrough_target.py | ||
| mock_grayswan_timeout_server.py | ||
| mutation_report.py | ||
| pre_commit_lint.sh | ||
| prisma_generate_if_needed.py | ||
| ruff_strict_gate.py | ||
| test_agent_mcp_endpoints.sh | ||
| test_guardrails_register_endpoints.sh | ||
| test_quality_gate.py | ||
| test_tool_allowlist_script.py | ||
| tpm_headline_test.sh | ||
| type_check_gate.py | ||
| type_discipline_gate.py | ||
| verify_adaptive_router.py | ||
| with_dashboard_node.sh | ||