Initial commit

This commit is contained in:
Кокос Артем Николаевич
2026-01-20 09:32:03 +07:00
commit e412bb7446
9 changed files with 427 additions and 0 deletions

20
tests/test_cli.py Normal file
View File

@@ -0,0 +1,20 @@
import pytest
from redmine_reporter.cli import parse_date_range
def test_parse_date_range_valid():
assert parse_date_range("2025-01-01--2025-12-31") == ("2025-01-01", "2025-12-31")
def test_parse_date_range_with_spaces():
assert parse_date_range("2025-01-01 -- 2025-12-31") == ("2025-01-01", "2025-12-31")
def test_parse_date_range_invalid_no_separator():
with pytest.raises(ValueError, match="must be in format"):
parse_date_range("2025-01-01")
def test_parse_date_range_invalid_parts():
with pytest.raises(ValueError, match="Invalid date range format"):
parse_date_range("2025-01-01--")