(barerepo: Repository)
| 51 | |
| 52 | |
| 53 | def test_read_commit(barerepo: Repository) -> None: |
| 54 | commit = barerepo[COMMIT_SHA] |
| 55 | assert isinstance(commit, Commit) |
| 56 | assert COMMIT_SHA == commit.id |
| 57 | parents = commit.parents |
| 58 | assert 1 == len(parents) |
| 59 | assert 'c2792cfa289ae6321ecf2cd5806c2194b0fd070c' == parents[0].id |
| 60 | assert commit.message_encoding is None |
| 61 | assert commit.message == ( |
| 62 | 'Second test data commit.\n\nThis commit has some additional text.\n' |
| 63 | ) |
| 64 | commit_time = 1288481576 |
| 65 | assert commit_time == commit.commit_time |
| 66 | assert commit.committer == Signature( |
| 67 | 'Dave Borowitz', 'dborowitz@google.com', commit_time, -420 |
| 68 | ) |
| 69 | assert commit.author == Signature( |
| 70 | 'Dave Borowitz', 'dborowitz@google.com', 1288477363, -420 |
| 71 | ) |
| 72 | assert '967fce8df97cc71722d3c2a5930ef3e6f1d27b12' == commit.tree.id |
| 73 | |
| 74 | |
| 75 | def test_new_commit(barerepo: Repository) -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…