Skip to content

Commit ff6ebbd

Browse files
committed
refactor: streamline docstring and error message in bedrock tests
Updated the docstring for the test_bedrock_provider_model_profile_all_geo_prefixes function to be more concise. Modified the error message in the test_latest_bedrock_model_names_geo_prefixes_are_supported function to remove the file path reference, enhancing clarity.
1 parent ee0ef61 commit ff6ebbd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/providers/test_bedrock.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,10 @@ def test_bedrock_provider_model_profile(env: TestEnv, mocker: MockerFixture):
105105

106106
@pytest.mark.parametrize('prefix', BEDROCK_GEO_PREFIXES)
107107
def test_bedrock_provider_model_profile_all_geo_prefixes(env: TestEnv, prefix: str):
108-
"""Test that all cross-region inference geo prefixes are correctly handled.
109-
110-
This is critical for AWS GovCloud (us-gov.) and other regional deployments
111-
where models use prefixes longer than 2 characters.
112-
"""
108+
"""Test that all cross-region inference geo prefixes are correctly handled."""
113109
env.set('AWS_DEFAULT_REGION', 'us-east-1')
114110
provider = BedrockProvider()
115111

116-
# Test Anthropic model with geo prefix
117112
model_name = f'{prefix}anthropic.claude-sonnet-4-5-20250929-v1:0'
118113
profile = provider.model_profile(model_name)
119114

@@ -142,5 +137,5 @@ def test_latest_bedrock_model_names_geo_prefixes_are_supported():
142137

143138
assert not missing_prefixes, (
144139
f'Found geo prefixes in LatestBedrockModelNames that are not in BEDROCK_GEO_PREFIXES: {missing_prefixes}. '
145-
f'Please add them to BEDROCK_GEO_PREFIXES in pydantic_ai/providers/bedrock.py'
140+
f'Please add them to BEDROCK_GEO_PREFIXES'
146141
)

0 commit comments

Comments
 (0)