From 449c5bff1e74f330b102316ed9f237a387ca4962 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Fri, 30 Jan 2026 20:35:31 +0000 Subject: [PATCH] Initial upload: git-insights-cli with CI/CD workflow --- tests/conftest.py | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..ca56adb --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,53 @@ +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", "tests/test_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, + ) + + +@pytest.fixture +def sample_commits(): + """Create a list of sample commits for testing.""" + commits = [] + for i in range(10): + commit = Commit( + sha=f"sha{i}123{i}", + message=f"Commit {i}", + author="Test User", + author_email="test@example.com", + timestamp=datetime(2024, 1, 15, 10 + i, 30, 0), + lines_added=10 * i, + lines_deleted=2 * i, + files_changed=[f"file{i}.py"], + is_merge=False, + is_revert=False, + ) + commits.append(commit) + return commits