Skip to content

Commit e3ea69b

Browse files
committed
improving util tests
1 parent 8a9e4a2 commit e3ea69b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/test_utils.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import os
2+
13
from datetime import date
2-
from gitevo.utils import DateUtils
4+
from gitevo.utils import DateUtils, is_git_dir
35

46
def test_date_range_year():
57
DateUtils.date_unit = 'year'
@@ -50,4 +52,11 @@ def test_formatted_dates_month():
5052
assert DateUtils.formatted_dates(dates) == ['01/2000', '02/2000', '03/2000', '04/2000',
5153
'05/2000', '06/2000', '07/2000', '08/2000',
5254
'09/2000', '10/2000', '11/2000', '12/2000',
53-
'01/2001', '02/2001', '03/2001', '04/2001']
55+
'01/2001', '02/2001', '03/2001', '04/2001']
56+
57+
def test_is_git_dir(local_repo):
58+
git_repo = os.path.join(local_repo, '.git')
59+
assert is_git_dir(git_repo)
60+
61+
def test_is_notgit_dir():
62+
assert not is_git_dir('gitevo')

0 commit comments

Comments
 (0)