Exemple #1
0
def get_commits_from_text_test4():
    text = ('{"proj1": {"2016/01/01": 3,'
            '"2016/01/03": 5},'
            ' "proj2": {"2016/01/02": 4,'
            '"2016/01/04": 6}}'
            )
    get_commits_from_text(text, 'sjon')
Exemple #2
0
def get_commits_from_text_test2():
    text = ('{"proj1": {"2016/01/01": 3,'
            '"2016/01/03": 5}}')
    assert(get_commits_from_text(text, 'json') ==
           {'proj1': {
            date(2016, 1, 1): 3,
            date(2016, 1, 3): 5}})
Exemple #3
0
def get_commits_from_text_test3():
    text = ('{"proj1": {"2016/01/01": 3,'
            '"2016/01/03": 5},'
            ' "proj2": {"2016/01/02": 4,'
            '"2016/01/04": 6}}'
            )
    assert(get_commits_from_text(text, 'json') ==
           {'proj1': {
            date(2016, 1, 1): 3,
            date(2016, 1, 3): 5},
            'proj2': {
            date(2016, 1, 2): 4,
            date(2016, 1, 4): 6}})
Exemple #4
0
def get_commits_from_text_test1():
    text = '{"proj1": {"2016/01/01": 3}}'
    assert(get_commits_from_text(text, 'json') ==
           {'proj1':
            {date(2016, 1, 1): 3}}
           )
Exemple #5
0
def get_commits_from_text_test0():
    text = '{}'
    assert(get_commits_from_text(text, 'json') == {})