Skip to content

Commit 5387583

Browse files
committed
Fix branch coverage missing after PR #1536
1 parent b354f1c commit 5387583

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

git_machete/git_operations.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,9 +1216,6 @@ def delete_branch(self, branch_name: LocalBranchShortName, *, force: bool) -> in
12161216
delete_option = '-D' if force else '-d'
12171217
return self._run_git('branch', delete_option, branch_name, flush_caches=True)
12181218

1219-
def delete_remote_branch(self, branch_name: RemoteBranchShortName) -> int:
1220-
return self._run_git('branch', '-d', '-r', branch_name, flush_caches=True)
1221-
12221219
def display_diff(self, branch: Optional[LocalBranchShortName], against: AnyRevision,
12231220
*, opt_stat: bool, extra_git_diff_args: List[str]) -> int:
12241221
params = []

tests/test_github_create_pr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,10 @@ def test_github_create_pr_for_no_push_qualifier(self, mocker: MockerFixture) ->
839839
commit()
840840
push() # Push the branch so it exists in the remote
841841

842+
# Add another commit to make the branch AHEAD_OF_REMOTE,
843+
# which tests the case where push=no prevents automatic push during create-pr
844+
commit()
845+
842846
rewrite_branch_layout_file("master\n\tdevelop push=no")
843847

844848
assert_success(

tests/test_gitlab_create_mr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,10 @@ def test_gitlab_create_mr_for_no_push_qualifier(self, mocker: MockerFixture) ->
820820
commit()
821821
push()
822822

823+
# Add another commit to make the branch AHEAD_OF_REMOTE,
824+
# which tests the case where push=no prevents automatic push during create-mr
825+
commit()
826+
823827
rewrite_branch_layout_file("master\n\tdevelop push=no")
824828

825829
assert_success(

tox.ini

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ install_command =
2424
deps =
2525
-r{[requirements]dir}/testenv.txt
2626
-r{[requirements]dir}/testenv-runtime.txt
27-
allowlist_externals = mkdir
2827
commands =
29-
mkdir -p test-results/
3028
# `python -m pytest` so that the local plugin for `--full-operands` can be loaded, see https://stackoverflow.com/a/48306599
3129
python -m pytest -p tests.pytest_full_operands \
3230
--numprocesses=auto --junitxml=test-results/testenv-{envname}.xml -m "not completion_e2e" {posargs}
@@ -98,7 +96,6 @@ deps =
9896
-r{[requirements]dir}/testenv-runtime.txt
9997
commands =
10098
pip install . # for some reason, `usedevelop = True` seems to be ignored
101-
mkdir -p test-results/
10299
pytest --numprocesses=auto --junitxml=test-results/testenv-{envname}.xml -m completion_e2e {posargs}
103100

104101
[pytest]

0 commit comments

Comments
 (0)