Skip to content

Commit 1af69c8

Browse files
fix(tutorials): install pytest-asyncio in async tutorial test images
The test images for five async tutorials install only `.[dev]`, but their tests import pytest_asyncio and those tutorials declare neither pytest-asyncio in their pyproject dev extras nor append it in the Dockerfile. As a result `docker exec ... pytest tests/test_agent.py` fails at collection with `ModuleNotFoundError: No module named 'pytest_asyncio'`. Append `pytest-asyncio httpx` to each install line, matching the convention already used by the passing sibling tutorials (e.g. 000_hello_acp). Affected: - 10_async/00_base/090_multi_agent_non_temporal - 10_async/10_temporal/060_open_ai_agents_sdk_hello_world - 10_async/10_temporal/070_open_ai_agents_sdk_tools - 10_async/10_temporal/080_open_ai_agents_sdk_human_in_the_loop - 10_async/10_temporal/090_claude_agents_sdk_mvp Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5e65454 commit 1af69c8

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

  • examples/tutorials/10_async

examples/tutorials/10_async/00_base/090_multi_agent_non_temporal/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ COPY 10_async/00_base/090_multi_agent_non_temporal/tests /app/090_multi_agent_no
3838
# Copy shared test utilities
3939
COPY test_utils /app/test_utils
4040

41-
# Install the required Python packages with dev dependencies
42-
RUN uv pip install --system .[dev]
41+
# Install the required Python packages with dev dependencies (includes pytest)
42+
RUN uv pip install --system .[dev] pytest-asyncio httpx
4343

4444
# Set environment variables
4545
ENV PYTHONPATH=/app

examples/tutorials/10_async/10_temporal/060_open_ai_agents_sdk_hello_world/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ COPY 10_async/10_temporal/060_open_ai_agents_sdk_hello_world/tests /app/060_open
4545
# Copy shared test utilities
4646
COPY test_utils /app/test_utils
4747

48-
# Install the required Python packages with dev dependencies
49-
RUN uv pip install --system .[dev]
48+
# Install the required Python packages with dev dependencies (includes pytest)
49+
RUN uv pip install --system .[dev] pytest-asyncio httpx
5050

5151
WORKDIR /app/060_open_ai_agents_sdk_hello_world
5252

examples/tutorials/10_async/10_temporal/070_open_ai_agents_sdk_tools/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ COPY 10_async/10_temporal/070_open_ai_agents_sdk_tools/tests /app/070_open_ai_ag
4545
# Copy shared test utilities
4646
COPY test_utils /app/test_utils
4747

48-
# Install the required Python packages with dev dependencies
49-
RUN uv pip install --system .[dev]
48+
# Install the required Python packages with dev dependencies (includes pytest)
49+
RUN uv pip install --system .[dev] pytest-asyncio httpx
5050

5151
WORKDIR /app/070_open_ai_agents_sdk_tools
5252

examples/tutorials/10_async/10_temporal/080_open_ai_agents_sdk_human_in_the_loop/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ COPY 10_async/10_temporal/080_open_ai_agents_sdk_human_in_the_loop/tests /app/08
4545
# Copy shared test utilities
4646
COPY test_utils /app/test_utils
4747

48-
# Install the required Python packages with dev dependencies
49-
RUN uv pip install --system .[dev]
48+
# Install the required Python packages with dev dependencies (includes pytest)
49+
RUN uv pip install --system .[dev] pytest-asyncio httpx
5050

5151
WORKDIR /app/080_open_ai_agents_sdk_human_in_the_loop
5252

examples/tutorials/10_async/10_temporal/090_claude_agents_sdk_mvp/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ COPY 10_async/10_temporal/090_claude_agents_sdk_mvp/tests /app/090_claude_agents
4545
# Copy shared test utilities
4646
COPY test_utils /app/test_utils
4747

48-
# Install the required Python packages with dev dependencies
49-
RUN uv pip install --system .[dev]
48+
# Install the required Python packages with dev dependencies (includes pytest)
49+
RUN uv pip install --system .[dev] pytest-asyncio httpx
5050

5151
WORKDIR /app/090_claude_agents_sdk_mvp
5252

0 commit comments

Comments
 (0)