(testrepo: Repository)
| 132 | |
| 133 | |
| 134 | def test_branches_with_commit(testrepo: Repository) -> None: |
| 135 | branches = testrepo.branches.with_commit(EXCLUSIVE_MASTER_COMMIT) |
| 136 | assert sorted(branches) == ['master'] |
| 137 | assert branches.get('i18n') is None |
| 138 | assert branches['master'].branch_name == 'master' |
| 139 | |
| 140 | branches = testrepo.branches.with_commit(SHARED_COMMIT) |
| 141 | assert sorted(branches) == ['i18n', 'master'] |
| 142 | |
| 143 | branches = testrepo.branches.with_commit(LAST_COMMIT) |
| 144 | assert sorted(branches) == ['master'] |
| 145 | |
| 146 | commit = testrepo[LAST_COMMIT] |
| 147 | assert isinstance(commit, Commit) |
| 148 | branches = testrepo.branches.with_commit(commit) |
| 149 | assert sorted(branches) == ['master'] |
| 150 | |
| 151 | branches = testrepo.branches.remote.with_commit(LAST_COMMIT) |
| 152 | assert sorted(branches) == [] |
| 153 | |
| 154 | |
| 155 | # |
nothing calls this directly
no test coverage detected
searching dependent graphs…