Skip to content

Commit a912c07

Browse files
committed
[mix-messy-docs] Add verification for feature search and feature delete
1 parent 13f2bf5 commit a912c07

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mix_messy_docs/verify.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ def verify(exercise: GitAutograderExercise) -> GitAutograderOutput:
6868
if not has_feature_delete_commit_merge:
6969
raise exercise.wrong_answer([MERGE_FEATURE_DELETE_SECOND, RESET_MESSAGE])
7070

71+
feature_search_branch = exercise.repo.branches.branch_or_none("feature-search")
72+
feature_delete_branch = exercise.repo.branches.branch_or_none("feature-delete")
73+
if feature_search_branch is not None:
74+
raise exercise.wrong_answer([FEATURE_SEARCH_BRANCH_STILL_EXISTS])
75+
76+
if feature_delete_branch is not None:
77+
raise exercise.wrong_answer([FEATURE_DELETE_BRANCH_STILL_EXISTS])
78+
7179
feature_list_branch = exercise.repo.branches.branch_or_none("feature-list")
7280
list_branch = exercise.repo.branches.branch_or_none("list")
7381
if feature_list_branch is None:

0 commit comments

Comments
 (0)