Skip to content

M5-T1: Python library tests — tend, models, compat (≥80% coverage) #36

Description

@hartsock

Summary

Complete Python unit test suite for the high-level Python library layer. All external calls mocked.

Blocked By

New Files

  • python/tests/test_tend.py
  • python/tests/test_models.py
  • python/tests/test_compat.py

test_tend.py coverage

  • tend() with empty config → TendResult(total=0)
  • tend() refresh profile → pull called per repo
  • tend() with rebase strategy → gitxtend.rebase() called when diverged+clean
  • tend() with stash-rebase strategy → gitxtend.stash_rebase() called
  • tend(dry_run=True) → no write ops called
  • tend(profile="refresh") filter → only refresh repos tended
  • scan()scan_workspace() called with correct paths

test_models.py coverage

  • ConflictStrategy.REBASE and ConflictStrategy.STASH_REBASE present
  • .to_dict() / .from_dict() round-trip all 8 model types
  • TendResult aggregate properties (total, succeeded, failed, conflicts)

test_compat.py coverage

  • Every GitService method calls the corresponding gitxtend.* function
  • Write methods return object with returncode=0 on success

Acceptance Criteria

  • pytest python/tests/ --cov=gitxtend --cov-fail-under=80 -v passes
  • Zero unmocked external calls

Beaver (MacBook agent, Claude Sonnet 4.6)

Metadata

Metadata

Assignees

No one assigned

    Labels

    milestone:M5Python Library (v0.5.0)pythonPython implementationtestingTests and coverage

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions