Skip to content

Separate shared API fixtures from backend registration - #3759

Merged
adamtheturtle merged 1 commit into
mainfrom
shared-fixture-boundary-20261014
Oct 14, 2026
Merged

adamtheturtle merged 1 commit into
mainfrom
shared-fixture-boundary-20261014

Conversation

@adamtheturtle

Copy link
Copy Markdown
Member

Shared API setup fixtures imported the repository's backend adapter solely to discard its setup result. Reusable client, target, and endpoint fixtures also lived in the same root configuration that registered that adapter.

Move those reusable fixtures into the explicit tests.mock_vws.fixtures.api_contract pytest plugin and leave adapter registration in the repository's root conftest.py. Remove the adapter imports from all 23 directory setup modules. Their ignored setup results now accept any object, allowing consumer adapters to return None or their own setup value.

Part of #3738.

Validation:

  • Both existing mock adapters: 1,494 passed, 750 skipped, with real-service execution disabled.
  • Independent consumer: 16 passed using custom URLs and setup results of None and a consumer-defined object. Flask and the repository's backend-adapter module were blocked from import; all 23 shared setup modules imported successfully.
  • All 2,819 collected test cases preserved. AST comparison confirms the 15 moved fixture/helper definitions are unchanged and directory fixtures differ only in imports and ignored-result annotations.
  • 100% coverage for every changed Python module.
  • Pre-commit and pre-push checks, including type checking, manifest validation and CI partition validation; changed-file Pylint; git diff --check.

This branch was successfully deployed

2 active deployments
development — 4caaa24b Deployed Oct 14, 2026 by adamtheturtle via pages #2402
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