def int_test_parse_commits():
    fixture = open(get_tst_path() + 'fixtures/test_git2json-1.txt')
    commits = list(git2json.parse_commits(fixture.read()))
    parent = commits[0]['parents']
    assert len(parent) == 2

    parent = commits[1]['parents']
    assert len(parent) == 1

    author = commits[0]['author']['name']
    eq_(author, 'Fernando Perez')

    email = commits[0]['author']['email']
    eq_(email.strip(), 'fernando.perez@berkeley.edu')

    author = commits[1]['author']['name']
    eq_(author, 'MinRK')

    email = commits[1]['author']['email']
    eq_(email, 'benjaminrk@gmail.com')

    committer = commits[0]['committer']['name']
    eq_(committer, 'Fernando Perez')

    email = commits[0]['committer']['email']
    eq_(email.strip(), 'fernando.perez@berkeley.edu')

    committer = commits[1]['committer']['name']
    eq_(committer, 'MinRK')

    email = commits[1]['committer']['email']
    eq_(email, 'benjaminrk@gmail.com')

    eq_(len(commits[0]['changes']), 0)
    eq_(len(commits[1]['changes']), 1)
Integration test: try to parse an entire git log from a file
dataset/ETHPy150Open tarmstrong/git2json/tests/test_git2json.py/int_test_parse_commits