Exemplo n.º 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')
Exemplo n.º 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}})
Exemplo n.º 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}})
Exemplo n.º 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}}
           )
Exemplo n.º 5
0
def get_commits_from_text_test0():
    text = '{}'
    assert(get_commits_from_text(text, 'json') == {})