Extract the multi-backend test harness from the Vuforia fixtures - #3413
Merged
Conversation
The mechanics of running one test suite against several interchangeable backends - a skip option per backend, parametrize IDs, and setup - were repeated in each of the three backend fixtures. Move them to ``tests/backend_harness.py``, which knows nothing about Vuforia and does not import from ``mock_vws``, so that it can later be extracted as a ``pytest`` plugin. Backends are still identified by ``VuforiaBackend`` members, and the collected test IDs are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <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.
The mechanics of running one test suite against several interchangeable backends — a
--skip-<backend>option, parametrize IDs, and setup — were repeated in each of the three backend fixtures, so they now live intests/backend_harness.py, which knows nothing about Vuforia and does not import frommock_vws. Backends are still identified byVuforiaBackendmembers, so the test-side comparisons againstVuforiaBackend.REALare untouched, and a_bind_setuphelper binds the five-argument setup shared by the two fixtures which need it. Collected test IDs are unchanged:pytest --collect-onlyreturns the same 1585 node IDs before and after this change. All three fixtures were exercised under--skip-real, and the new and changed files are clean under ruff, mypy, pyright, pylint and interrogate. The intent is that the harness can later be extracted as apytestplugin by moving the file rather than rewriting it.🤖 Generated with Claude Code