Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_inject_session_state_raises_on_unresolved_variable(self):
mock_ctx = MagicMock()
mock_ctx._invocation_context.session.state = {}
with pytest.raises(KeyError, match="repo"):
asyncio.get_event_loop().run_until_complete(inject_session_state("Clone {repo}", mock_ctx))
asyncio.run(inject_session_state("Clone {repo}", mock_ctx))

def test_raw_string_instruction_would_not_bypass(self):
"""A raw string in the instruction field would set bypass_state_injection=False.
Expand All @@ -131,6 +131,6 @@ def test_raw_string_instruction_would_not_bypass(self):
# Temporarily set instruction to a raw string to verify ADK behavior
agent.instruction = "Raw string with {repo}"
mock_ctx = MagicMock()
text, bypass = asyncio.get_event_loop().run_until_complete(agent.canonical_instruction(mock_ctx))
text, bypass = asyncio.run(agent.canonical_instruction(mock_ctx))
assert bypass is False, "raw string in instruction must set bypass_state_injection=False"
assert text == "Raw string with {repo}"
6 changes: 3 additions & 3 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ members = ["packages/*", "samples/adk/*", "samples/langgraph/*", "samples/crewai

[dependency-groups]
dev = [
"pytest>=9.0.3",
"pytest-asyncio>=0.25.3",
"ruff>=0.15.13",
"pytest>=9.1.0",
"pytest-asyncio>=1.4.0",
"ruff>=0.15.17",
"authlib>=1.7.2"
]

Expand Down
Loading
Loading