Skip to content

test: split oversized database and workflow test modules #234

@adrunkhuman

Description

@adrunkhuman

Goal

Split the remaining oversized test modules into smaller contract-focused files so v3 work stays reviewable.

Context

After the v3 season/scoring work, several test files are now large enough to slow navigation and make focused reviews harder:

  • tests/test_database.py (~2.1k lines)
  • tests/test_admin_panel_fixtures.py (~1.4k lines)
  • tests/test_user_commands.py (~1.1k lines)

Test files can be larger than production modules, but these now mix multiple contracts and setup styles.

Scope

Prefer small, mechanical splits with no behavior changes:

  • split tests/test_database.py by repository/contract area, for example seasons, fixtures, scoring, schema validation, predictions
  • consider splitting tests/test_admin_panel_fixtures.py by fixture creation/edit/delete/season/scoring behaviors
  • consider splitting tests/test_user_commands.py by command surface if it remains difficult to navigate
  • keep shared fixtures/helpers in conftest.py or focused helper modules only when reuse is real

Non-goals

  • do not rewrite test behavior just to split files
  • do not add broad abstractions or helper frameworks
  • do not weaken coverage or turn behavior tests into mock-call choreography

Acceptance criteria

  • tests are split into focused modules with clear names
  • full suite still passes
  • no production code changes unless needed for imports

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions