Skip to content

Commit 7b87056

Browse files
GWealecopybara-github
authored andcommitted
fix: adapt fixtures for pytest 9 rules
Co-authored-by: George Weale <gweale@google.com> PiperOrigin-RevId: 830493430
1 parent 7937e9e commit 7b87056

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

tests/unittests/agents/test_resumable_llm_agent.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ class TestResumableLlmAgent:
100100
"""Test suite for resumable LlmAgent."""
101101

102102
@pytest.fixture
103-
@pytest.mark.asyncio
104103
async def resumable_invocation_context(self):
105104
"""Creates an invocation context for the specified agent."""
106105

tests/unittests/cli/test_fast_api.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,11 +410,10 @@ async def create_test_eval_set(
410410

411411

412412
@pytest.fixture
413-
@pytest.mark.skipif(
414-
sys.version_info < (3, 10), reason="A2A requires Python 3.10+"
415-
)
416413
def temp_agents_dir_with_a2a():
417414
"""Create a temporary agents directory with A2A agent configurations for testing."""
415+
if sys.version_info < (3, 10):
416+
pytest.skip("A2A requires Python 3.10+")
418417
with tempfile.TemporaryDirectory() as temp_dir:
419418
# Create test agent directory
420419
agent_dir = Path(temp_dir) / "test_a2a_agent"
@@ -448,9 +447,6 @@ def __init__(self):
448447

449448

450449
@pytest.fixture
451-
@pytest.mark.skipif(
452-
sys.version_info < (3, 10), reason="A2A requires Python 3.10+"
453-
)
454450
def test_app_with_a2a(
455451
mock_session_service,
456452
mock_artifact_service,
@@ -461,6 +457,8 @@ def test_app_with_a2a(
461457
temp_agents_dir_with_a2a,
462458
):
463459
"""Create a TestClient for the FastAPI app with A2A enabled."""
460+
if sys.version_info < (3, 10):
461+
pytest.skip("A2A requires Python 3.10+")
464462

465463
# Mock A2A related classes
466464
with (

0 commit comments

Comments
 (0)