Skip to content

fix(tests): mock VisualStepSummarizer in test_turn_index_snapshot - #35

Open
Sebxxs004 wants to merge 1 commit into
google:mainfrom
Sebxxs004:fix/mock-visual-step-summarizer-in-tests
Open

Sebxxs004 wants to merge 1 commit into
google:mainfrom
Sebxxs004:fix/mock-visual-step-summarizer-in-tests

Conversation

@Sebxxs004

Copy link
Copy Markdown

Fixes #31

Summary

Running tests/unit/agents/flash/test_turn_index_snapshot.py without GOOGLE_API_KEY set caused tests to fail during FlashRunner initialization because VisualStepSummarizer attempts to create a ChatGoogleGenerativeAI instance.

Since the test fixture immediately discards the summarizer (runner.summarizer = None), attempting to initialize Gemini API clients is unnecessary and breaks offline test runs.

Proposed Changes

  • Patched artemis.agents.flash.runner.VisualStepSummarizer inside the _runner test fixture in tests/unit/agents/flash/test_turn_index_snapshot.py.

Verification

  • Executed uv run pytest tests/unit/agents/flash/test_turn_index_snapshot.py and confirmed all 5 unit tests pass deterministically without needing GOOGLE_API_KEY.

@google-cla

google-cla Bot commented Sep 11, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_turn_index_snapshot fails offline when GOOGLE_API_KEY is not set

1 participant