From d295efafbb3b7ff48dd7b89ee0931d56af23d8a5 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 22 Feb 2026 09:41:21 +0000 Subject: [PATCH] Fix PytestAssertRewriteWarning for credentials fixture module 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 --- tests/conftest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 0ce40f5e8..957422d2c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -11,9 +11,12 @@ from mock_vws.database import CloudDatabase from tests.mock_vws.utils import Endpoint +# `credentials` must be listed before modules that import from it. +# If listed later, those imports happen before pytest can register it for +# assertion rewriting, causing a PytestAssertRewriteWarning. pytest_plugins = [ - "tests.mock_vws.fixtures.prepared_requests", "tests.mock_vws.fixtures.credentials", + "tests.mock_vws.fixtures.prepared_requests", "tests.mock_vws.fixtures.vuforia_backends", ]