Skip to content

Commit f633484

Browse files
committed
Add test for regular properties to not produce deprecationWarning
1 parent c94d6aa commit f633484

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/test_types.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ def test_use_get_task_push_notification_params_for_request() -> None:
15301530
)
15311531

15321532

1533-
def test_camelCase() -> None:
1533+
def test_camelCase(recwarn) -> None:
15341534
skill = AgentSkill(
15351535
id='hello_world',
15361536
name='Returns hello world',
@@ -1551,16 +1551,21 @@ def test_camelCase() -> None:
15511551
supportsAuthenticatedExtendedCard=True,
15521552
)
15531553

1554+
# Test accessing a standard property like 'version' should not produce a deprecation warning
1555+
version = agent_card.version
1556+
assert version == '1.0.0'
1557+
assert (
1558+
not recwarn.list # Assert that no warnings were emitted during the access
1559+
)
1560+
15541561
# Test setting an attribute via camelCase alias
1555-
# We expect a DeprecationWarning with a specific message
15561562
with pytest.warns(
15571563
DeprecationWarning,
15581564
match="Setting field 'supportsAuthenticatedExtendedCard'",
15591565
):
15601566
agent_card.supportsAuthenticatedExtendedCard = False
15611567

15621568
# Test getting an attribute via camelCase alias
1563-
# We expect another DeprecationWarning with a specific message
15641569
with pytest.warns(
15651570
DeprecationWarning, match="Accessing field 'defaultInputModes'"
15661571
):

0 commit comments

Comments
 (0)