update verify logic and test case for merge-undo#273
Conversation
|
Hi @SAN-MUYUN, thank you for your contribution! 🎉 This PR comes from your fork Before you request for a review, please ensure that you have tested your changes locally! Important The previously recommended way of using Please read the following instructions for the latest instructions. PrerequisitesEnsure that you have the Testing stepsIf you already have a local Git-Mastery root to test, you can skip the following step. Create a Git-Mastery root locally: gitmastery setupNavigate into the Git-Mastery root (defaults to cd gitmastery-exercises/Edit the {
# other fields...
"exercises_source": {
"username": "SAN-MUYUN",
"repository": "git-mastery-exercises",
"branch": "enhancement/merge-undo"
}
}Then, you can use the gitmastery download <your new change>
gitmastery verifyChecklist
Important To any reviewers of this pull request, please use the same instructions above to test the changes. |
desmondwong1215
left a comment
There was a problem hiding this comment.
Just some small nits to be fixed. Overall, LGTM!
merge_undo/verify.py
Outdated
| "You aren't currently on the main branch. Checkout to that branch and try again!" | ||
| ) | ||
| DETACHED_HEAD = "You should not be in a detached HEAD state! Use git checkout main to get back to main" | ||
| MAIN_BRANCH_MISSING = "Main branch is missing, you can reset the exercises if needed and try again." |
There was a problem hiding this comment.
It seems to have duplicate message with RESET_MESSAGE.
|
|
||
| main_branch = exercise.repo.branches.branch("main") | ||
| if not main_branch: | ||
| raise exercise.wrong_answer([MAIN_BRANCH_MISSING, RESET_MESSAGE]) |
There was a problem hiding this comment.
User will see duplicate message at here.
merge_undo/test_verify.py
Outdated
| ) | ||
|
|
||
|
|
||
| def test_not_main(): |
There was a problem hiding this comment.
Will it be better if we rename it to test_main_missing.
Exercise Review
Exercise Discussion
#269
Removed the unnecessary check that enforces students to be on
mainbranch when runningverify.Checklist
Git-Masteryorganization, have you created a request for it?repo-smithto validate the exercise grading scheme?git-autograder?app?