Fix PytestAssertRewriteWarning for credentials fixture module#2992
Merged
adamtheturtle merged 1 commit intomainfrom Feb 22, 2026
Merged
Fix PytestAssertRewriteWarning for credentials fixture module#2992adamtheturtle merged 1 commit intomainfrom
adamtheturtle merged 1 commit intomainfrom
Conversation
Move `tests.mock_vws.fixtures.credentials` first in `pytest_plugins` so pytest registers it for assertion rewriting before other fixture modules import it as a side effect. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Move
tests.mock_vws.fixtures.credentialsfirst inpytest_pluginsso pytest registers it for assertion rewriting before other fixture modules (prepared_requests,vuforia_backends) import it as a side effect, which was causing aPytestAssertRewriteWarning.Note
Low Risk
Test-only change that adjusts plugin import order and adds comments; low risk aside from potential fixture import-order assumptions.
Overview
Reorders
pytest_pluginsintests/conftest.pysotests.mock_vws.fixtures.credentialsis loaded before other fixture modules, and documents the reason.This prevents a
PytestAssertRewriteWarningby ensuring pytest registerscredentialsfor assertion rewriting before it is imported as a side effect elsewhere.Written by Cursor Bugbot for commit d295efa. This will update automatically on new commits. Configure here.