Skip to content

Increase test coverage to 100% #776

Description

@abrookins

Summary

Increase test coverage from 54% to 100% across all modules.

Current Coverage (as of 1.0)

Module Current Target
model/model.py 77% 100%
migrations/schema/legacy_migrator.py 81% 100%
migrations/schema/migrator.py 47% 100%
model/cli/migrate.py 53% 100%
model/cli/index.py 17% 100%
model/cli/migrate_data.py 24% 100%
migrations/data/migrator.py 11% 100%
migrations/data/builtin/datetime_migration.py 14% 100%
migrations/data/base.py 38% 100%
model/query_resolver.py 0% 100%
model/render_tree.py 9% 100%
checks.py 40% 100%

Overall: 54% → 100%

Priority Areas

High Priority (core functionality)

  • model/model.py - Core ORM logic
  • migrations/schema/migrator.py - File-based migrations
  • migrations/schema/legacy_migrator.py - Schema detection

Medium Priority (CLI)

  • model/cli/index.py - Index management CLI
  • model/cli/migrate.py - Migration CLI
  • model/cli/migrate_data.py - Data migration CLI

Lower Priority (utilities)

  • migrations/data/* - Data migration internals
  • model/query_resolver.py - Query resolution
  • model/render_tree.py - Tree rendering
  • checks.py - Feature detection

Testing Approach

  1. Unit tests for pure functions and classes
  2. Integration tests with Redis (using testcontainers)
  3. CLI tests using Click's test runner
  4. Mock tests for error paths and edge cases

Notes

  • All tests must use testcontainers, never localhost:6379
  • Follow existing test patterns in tests/
  • Run make sync after adding tests to generate sync versions

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions