File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -541,7 +541,9 @@ def abort_cherry_pick(self):
541541 run `git cherry-pick --abort` and then clean up the branch
542542 """
543543 if self .initial_state != WORKFLOW_STATES .BACKPORT_PAUSED :
544- raise ValueError ("One can only abort a paused process." )
544+ raise ValueError (
545+ f"One can only abort a paused process. Current state: { self .initial_state } . Expected state: { WORKFLOW_STATES .BACKPORT_PAUSED } "
546+ )
545547
546548 try :
547549 validate_sha ("CHERRY_PICK_HEAD" )
Original file line number Diff line number Diff line change 11import os
22import pathlib
3+ import re
34import subprocess
45import warnings
56from collections import ChainMap
@@ -1141,7 +1142,7 @@ def test_continue_cherry_pick_invalid_state(tmp_git_repo_dir):
11411142
11421143 assert get_state () == WORKFLOW_STATES .UNSET
11431144
1144- with pytest .raises (ValueError , match = r"^One can only continue a paused process.$" ):
1145+ with pytest .raises (ValueError , match = re . compile ( r"^One can only continue a paused process." ) ):
11451146 cherry_picker .continue_cherry_pick ()
11461147
11471148 assert get_state () == WORKFLOW_STATES .UNSET # success
@@ -1167,7 +1168,7 @@ def test_abort_cherry_pick_invalid_state(tmp_git_repo_dir):
11671168
11681169 assert get_state () == WORKFLOW_STATES .UNSET
11691170
1170- with pytest .raises (ValueError , match = r"^One can only abort a paused process.$" ):
1171+ with pytest .raises (ValueError , match = re . compile ( r"^One can only abort a paused process." ) ):
11711172 cherry_picker .abort_cherry_pick ()
11721173
11731174
You can’t perform that action at this time.
0 commit comments