redis / redis/redis-om-python

Increase test coverage to 100%

Open
#776 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
1.3k
Forks
128
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing patterns in tests/ and the listed modules, prioritizing model/model.py and migrations/schema/migrator.py. Add unit, Redis testcontainer integration, CLI, and error-path tests as appropriate; done means the listed modules reach 100% coverage, no tests use localhost:6379, and make sync generates synchronized tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, redis
Domain
testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.