Skip to content

test: add pytest test suite for commit-ai#39

Open
Simons-holo wants to merge 1 commit into
josharsh:mainfrom
Simons-holo:main
Open

test: add pytest test suite for commit-ai#39
Simons-holo wants to merge 1 commit into
josharsh:mainfrom
Simons-holo:main

Conversation

@Simons-holo

Copy link
Copy Markdown

Implements issue #20 - adds pytest test suite for commit-ai.

Changes

  • Created commit-ai/test_commit.py with 8 test cases
  • Tests cover: get_diff, get_branch, get_recent_commits, generate_commit_message, empty_diff, auto_commit

Test Cases

  1. test_get_diff_staged - staged diff
  2. test_get_diff_all - all diff
  3. test_get_branch - branch detection
  4. test_get_recent_commits - recent commits
  5. test_generate_commit_message_conventional - conventional format
  6. test_generate_commit_message_simple - simple format
  7. test_empty_diff - empty diff handling
  8. test_auto_commit - auto commit functionality

Acceptance Criteria

  • 5+ test cases covering core functionality
  • Tests use mocking for external APIs
  • Uses pytest framework

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant