Files
git-insights-cli/tests/conftest.py
7000pctAUTO b24d4c53f8
Some checks failed
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
Add test fixtures and unit tests for CLI, models, and formatters
2026-02-01 08:29:46 +00:00

33 lines
786 B
Python

import pytest
from src.models.data_structures import Author, Commit
from datetime import datetime
@pytest.fixture
def sample_commit():
"""Create a sample commit for testing."""
return Commit(
sha="abc123def456",
message="Add new feature",
author="Test User",
author_email="test@example.com",
timestamp=datetime(2024, 1, 15, 10, 30, 0),
lines_added=50,
lines_deleted=10,
files_changed=["src/new_feature.py"],
is_merge=False,
is_revert=False,
)
@pytest.fixture
def sample_author():
"""Create a sample author for testing."""
return Author(
name="Test User",
email="test@example.com",
commit_count=42,
lines_added=5000,
lines_deleted=1000,
)