tests/backend_harness.py, added in #3413, holds the generic mechanics for running one test suite against several interchangeable backends: a --skip-<backend> option per backend, parametrize IDs, and setup. It knows nothing about Vuforia and does not import from mock_vws, so extracting it should be a move rather than a rewrite.
Running the same suite against a real service, an in-memory fake, and that fake behind HTTP is how a fake is kept honest, and nothing on PyPI packages the pattern.
Before it can move out:
- It has no tests of its own. It is currently covered only indirectly, through the Vuforia suite.
- It is a helper library, not a plugin. A real plugin would own the
pytest_addoption hook itself and probably offer a fixture factory, rather than leaving each project to write its own fixtures. That shape should be designed against a second consumer rather than guessed at now.
--skip-docker_build_tests and its pytest_collection_modifyitems hook stayed behind in tests/mock_vws/fixtures/vuforia_backends.py, because they are about Docker builds rather than backends. "Skip tests carrying marker X via an option" is a related generic idea which may belong in the same package.
Closing this means the module moves to its own package and this repository depends on it.
tests/backend_harness.py, added in #3413, holds the generic mechanics for running one test suite against several interchangeable backends: a--skip-<backend>option per backend, parametrize IDs, and setup. It knows nothing about Vuforia and does not import frommock_vws, so extracting it should be a move rather than a rewrite.Running the same suite against a real service, an in-memory fake, and that fake behind HTTP is how a fake is kept honest, and nothing on PyPI packages the pattern.
Before it can move out:
pytest_addoptionhook itself and probably offer a fixture factory, rather than leaving each project to write its own fixtures. That shape should be designed against a second consumer rather than guessed at now.--skip-docker_build_testsand itspytest_collection_modifyitemshook stayed behind intests/mock_vws/fixtures/vuforia_backends.py, because they are about Docker builds rather than backends. "Skip tests carrying marker X via an option" is a related generic idea which may belong in the same package.Closing this means the module moves to its own package and this repository depends on it.