litellm/tests/test_litellm/proxy/client/cli
ryan-crabbe-berri b76def0e5d
test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769)
`pytest.raises(Exception)` with no `match=` passes on any error that broad. A
TypeError from a refactor, a botched fixture, an import that moved: all of them
read as the rejection the test claims to police, so the test goes green for the
wrong reason and stays green after the behaviour it guards is gone.

PT011 closes that gap for the 317 sites B017 could not reach, because B017 only
fires on a single-statement body with no `as e` binding. Each pattern here is the
message the code actually raised, recorded by running the sites under a plugin
that logged the concrete type and text per call site, so the assertions describe
observed behaviour rather than a guess. Where a site raises more than one message
across its parametrize cases, the pattern is an alternation of what was seen;
where the exception carries an empty `str()` and puts the text on `.message`, the
site keeps a narrow `noqa` with the reason.

PT014 removes four parametrize cases that were listed twice. The duplicate re-runs
an assertion that already passed, and it usually marks a case someone meant to
vary and forgot to edit.
2026-08-20 20:24:49 -07:00
..
autoroute fix(autoroute): discover models via /v1/models so an AI-API-only key works (#34259) 2026-07-22 20:50:14 -07:00
__init__.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_agents.py feat(cli): store the lite login credential in the OS keychain 2026-08-19 18:57:35 -07:00
test_auth_commands.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_claude_settings.py feat(cli): store the lite login credential in the OS keychain 2026-08-19 18:57:35 -07:00
test_config_commands.py feat(cli): store the lite login credential in the OS keychain 2026-08-19 18:57:35 -07:00
test_credentials_commands.py test fix creds test 2025-07-03 22:01:52 -07:00
test_encryption_commands.py feat(proxy): add AES-256-GCM at-rest credential encryption with versioned format and re-encryption migration (#31215) 2026-06-29 20:14:22 +02:00
test_global_options.py test(cli): use example.com placeholder host in base-url trailing slash test (#37240) 2026-08-18 00:52:10 +00:00
test_keys_commands.py fix(cli): make CLI output ASCII-only so it doesn't crash legacy Windows consoles (#33465) 2026-07-16 10:35:06 -07:00
test_model_groups_commands.py feat(cli): add lite up/down to ambiently route Claude Code through the proxy (#33231) 2026-07-15 21:46:02 -07:00
test_models_commands.py sys.path.insert for cli tests 2025-07-03 15:58:49 -07:00
test_pkce_login.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_up_commands.py Merge origin/litellm_internal_staging into litellm_cli_refresh_tokens 2026-08-20 10:54:48 -07:00
test_users_commands.py sys.path.insert for cli tests 2025-07-03 15:58:49 -07:00