Skip to content

Split test_branching.py into a tests/branching package by area #950

Open

Description

@bctiemann

Proposed change

Split tests/test_branching.py (about 4,000 lines) into a tests/branching/ package by what the tests exercise:

  • base: the shared helpers and BranchingTestBase (HAS_BRANCHING, _provision_branch, _close_branch_connections and so on).
  • test_merge_matrix: the merge-and-revert tests run under both merge strategies (BaseBranchingTests and its iterative and squash subclasses), and MissingFieldTypesTestCase.
  • test_merge: the other merge scenarios: field attribute changes, tags and journal entries, choice sets and search weight, and concurrent edits merged under both strategies.
  • test_sync: BranchSyncTestCase and ConcurrentEditSyncTestCase.
  • test_renames: SequentialRenameTestCase and its squash subclass.
  • test_heal: BranchUpgradeHealTestCase.
  • test_graphql: GraphQLBranchIsolationTestCase and GraphQLBranchEndpointTestCase.
  • test_isolation: branch deletion and isolation from main (BranchDeletionTestCase, BranchContextDeletionTestCase, InboundRelationBranchIsolationTestCase, BranchCOTDeletionIsolationTestCase, PolymorphicReverseAccessorBranchTestCase).
  • test_helpers: tests/test_branching_helpers.py, moved.

tests/schema/test_apply_permissions.py imports its branch helpers from branching.base instead. Tests move unchanged.

Justification

test_branching.py is the largest test module by far. Its classes cover merge, sync, upgrade heal, GraphQL and isolation, so a failing test is hard to place and a new one has no obvious home. A package split by area matches tests/api/, tests/models/, tests/upgrade/ and tests/graphql/.

Activity

  1. added this to the v1.0.0 milestone on Oct 24, 2026
  2. self-assigned this
    on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions