Skip to content

fix(tests): resolve merge conflict in test_vertex_ai_rerank_transformation.py#21478

Merged
jquinter merged 1 commit intomainfrom
fix/vertex-rerank-merge-conflict
Feb 18, 2026
Merged

fix(tests): resolve merge conflict in test_vertex_ai_rerank_transformation.py#21478
jquinter merged 1 commit intomainfrom
fix/vertex-rerank-merge-conflict

Conversation

@jquinter
Copy link
Copy Markdown
Contributor

Summary

  • tests/test_litellm/llms/vertex_ai/rerank/test_vertex_ai_rerank_transformation.py had two unresolved git merge conflict markers (<<<<<<< litellm_oss_staging_02_17_2026 / >>>>>>> main) on lines 44 and 112
  • pytest failed to collect the module with SyntaxError: invalid syntax at line 44
  • Fixed by resolving both conflicts, keeping the instance-level mocking approach from the staging branch which is consistent with the rest of the file (avoids @patch class-reference issues caused by importlib.reload(litellm) in conftest.py)

Test plan

  • File parses without syntax error: python -c "import ast; ast.parse(open('tests/test_litellm/llms/vertex_ai/rerank/test_vertex_ai_rerank_transformation.py').read())"
  • poetry run pytest tests/test_litellm/llms/vertex_ai/rerank/test_vertex_ai_rerank_transformation.py -v collects and runs tests

🤖 Generated with Claude Code

…ation.py

The file had two unresolved git merge conflict markers from a merge of
litellm_oss_staging_02_17_2026 into main, causing a SyntaxError when
pytest tried to collect the test module.

Kept the instance-level mocking approach (from litellm_oss_staging) for
test_get_complete_url and test_validate_environment, which is consistent
with the rest of the file and avoids class-reference issues caused by
importlib.reload(litellm) in conftest.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Feb 18, 2026 2:33pm

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 18, 2026

Greptile Summary

This PR resolves two unresolved git merge conflict markers in the Vertex AI rerank test file that caused SyntaxError during pytest collection.

  • Conflict resolution: Both conflicts (at test_get_complete_url and test_validate_environment) are resolved by keeping the staging branch's instance-level mocking approach over the main branch's decorator-based approach
  • Correct choice: The instance-level mocking is the right approach because conftest.py calls importlib.reload(litellm), which invalidates class references used by decorator-based patches. The rest of the file already uses this pattern consistently
  • No functional changes: Only conflict markers and duplicate code from the main branch variant are removed (45 lines deleted, 0 lines added)
  • Tests remain mock-only: All tests continue to use mocks with no real network calls

Confidence Score: 5/5

  • This PR is safe to merge — it only removes merge conflict markers and duplicate test code, with no functional changes.
  • The change is purely a merge conflict resolution in a test file. It removes 45 lines (conflict markers and the discarded main-branch variant of two test methods) with zero lines added. The chosen resolution (instance-level mocking) is consistent with the rest of the file and correctly accounts for the importlib.reload behavior in conftest.py. The resulting file has no remaining conflict markers and parses cleanly.
  • No files require special attention.

Important Files Changed

Filename Overview
tests/test_litellm/llms/vertex_ai/rerank/test_vertex_ai_rerank_transformation.py Resolves two unresolved git merge conflict markers (lines 44 and 112) by keeping the instance-level mocking approach from the staging branch, which is resilient to importlib.reload(litellm) in conftest.py. No issues found.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["test_get_complete_url\ntest_validate_environment"] --> B{"Mocking approach?"}
    B -->|"Staging branch - kept"| C["Instance-level mock on\nself.config object"]
    B -->|"Main branch - removed"| D["Decorator-based patch\non class reference"]
    C --> E["Resilient to importlib.reload\nin conftest.py"]
    D --> F["Breaks when importlib.reload\ninvalidates class reference"]
    E --> G["Tests pass"]
    F --> H["Tests fail"]
Loading

Last reviewed commit: 419151d

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@jquinter jquinter merged commit 63783db into main Feb 18, 2026
20 of 26 checks passed
@ishaan-berri ishaan-berri deleted the fix/vertex-rerank-merge-conflict branch March 26, 2026 22:29
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.

1 participant