1
0
This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
git-time-tracker/test/test_util.py

18 lines
398 B
Python
Raw Normal View History

2024-06-08 13:09:57 +00:00
import git_time_tracker
2024-08-25 21:41:42 +00:00
2024-06-08 13:09:57 +00:00
def test_year_ranges_1():
2024-08-25 21:41:42 +00:00
assert git_time_tracker.fmt_year_ranges([1, 2, 3]) == '1-3'
2024-06-08 13:09:57 +00:00
def test_year_ranges_2():
2024-08-25 21:41:42 +00:00
assert git_time_tracker.fmt_year_ranges([1, 3]) == '1,3'
2024-06-08 13:09:57 +00:00
def test_year_ranges_3():
2024-08-25 21:41:42 +00:00
assert git_time_tracker.fmt_year_ranges([1, 2, 4]) == '1-2,4'
2024-06-08 13:09:57 +00:00
def test_year_ranges_4():
2024-08-25 21:41:42 +00:00
assert git_time_tracker.fmt_year_ranges([1, 2, 4, 5]) == '1-2,4-5'