Skip to content

Fix PytestAssertRewriteWarning for credentials fixture module#2992

Merged
adamtheturtle merged 1 commit intomainfrom
adamtheturtle/fix-pytest-rewrite-warning
Feb 22, 2026
Merged

Fix PytestAssertRewriteWarning for credentials fixture module#2992
adamtheturtle merged 1 commit intomainfrom
adamtheturtle/fix-pytest-rewrite-warning

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 22, 2026

Move tests.mock_vws.fixtures.credentials first in pytest_plugins so pytest registers it for assertion rewriting before other fixture modules (prepared_requests, vuforia_backends) import it as a side effect, which was causing a PytestAssertRewriteWarning.


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_plugins in tests/conftest.py so tests.mock_vws.fixtures.credentials is loaded before other fixture modules, and documents the reason.

This prevents a PytestAssertRewriteWarning by ensuring pytest registers credentials for 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.

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>
@adamtheturtle adamtheturtle merged commit 5d5701b into main Feb 22, 2026
106 checks passed
@adamtheturtle adamtheturtle deleted the adamtheturtle/fix-pytest-rewrite-warning branch February 22, 2026 09:56
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