Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 36f0732

Browse filesBrowse files
committed
mock the validate_sha
1 parent 1c816d0 commit 36f0732
Copy full SHA for 36f0732

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎cherry_picker/cherry_picker/test.py

Copy file name to clipboardExpand all lines: cherry_picker/cherry_picker/test.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ def test_get_author_info_from_short_sha(subprocess_check_output):
176176
],
177177
)
178178
@mock.patch("os.path.exists")
179+
@mock.patch("cherry_picker.cherry_picker.validate_sha")
179180
def test_sorted_branch(os_path_exists, config, input_branches, sorted_branches):
180181
os_path_exists.return_value = True
181182
cp = CherryPicker(
@@ -384,7 +385,6 @@ def test_load_config_no_head_sha(tmp_git_repo_dir, git_add, git_commit):
384385
)
385386
git_add(relative_config_path)
386387
git_commit(f"Add {relative_config_path}")
387-
scm_revision = get_sha1_from("HEAD")
388388

389389
with mock.patch("cherry_picker.cherry_picker.get_sha1_from", return_value=""):
390390
cfg = load_config(relative_config_path)
@@ -463,7 +463,7 @@ def test_from_git_rev_read_uncommitted(tmp_git_repo_dir, git_add, git_commit):
463463
)
464464
git_add(".")
465465
with pytest.raises(ValueError):
466-
from_git_rev_read("HEAD:" + relative_file_path) == some_text
466+
from_git_rev_read("HEAD:" + relative_file_path)
467467

468468

469469
def test_from_git_rev_read(tmp_git_repo_dir, git_add, git_commit):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.