test(embedder): isolate Ark factory tests from optional SDK - #2215
Open
RerankerGuo wants to merge 1 commit into
Open
test(embedder): isolate Ark factory tests from optional SDK#2215RerankerGuo wants to merge 1 commit into
RerankerGuo wants to merge 1 commit into
Conversation
Collaborator
🤖 Open Code ReviewTarget: PR #2215 ✅ OpenCodeReview: No comments generated. Looks good to me. Generated by cloud-assistant via Open Code Review. |
Collaborator
✅ Automated Test Results: PASSEDAll tests passed (2/2 executed). memos_python_core/changed-repo-python: 2/2. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-6ae0aeed3ed9721c-20260805142200: 37/38 passed, 1 failed — these do NOT affect the PR verdict; review the branch manually. Branch: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Ark factory unit tests mock
ArkEmbedder.embed, but constructing the embedder still executes the optionalvolcenginesdkarkruntimedependency guard. As a result, these factory tests fail in a normal core/test environment even though they never exercise the Ark SDK.This change mocks the constructor boundary as well as
embed, keeping the tests focused on factory selection and single/batch forwarding. Production dependency validation remains covered by the real constructor.Related Issue (Required): N/A — test isolation regression found on current
main.Type of change
How Has This Been Tested?
pytest tests/configs tests/embedders tests/multi_mem_cube -qfailed both Ark tests without the optional SDK..venv/bin/pytest tests/embedders/test_ark.py -q(2 passed)..venv/bin/ruff check tests/embedders/test_ark.py.venv/bin/ruff format --check tests/embedders/test_ark.pyChecklist