Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This improves the tests of git hooks in
test_index.py:xfailmarks for theWinBashStatus.Absentcondition. This is a test bug from when I added thexfailmarks in #1745. TheAbsentcondition was detected correctly, but not always used, or used properly, inxfailmarkings.run_commit_hookitself. The other tests test specific kinds of hooks.run_commit_hookis public so it's reasonable for it to have its own test, plus I anticipate this will help future work.Their commit messages include some more details, including rationale.
I have made sure to test on a Windows system that truly does not have
bash.exe(as well testing theWinBashStatus.Wslcase, which CI confirms, and theWinBashStatus.Nativecase).One might worry that I missed this before due to some further bug, but I believe not. Producing a genuine
WslBashStatus.Absentcondition on a Windows system that has a system-provided WSL-relatedbash.exeinSystem32(which is searched regardless of what is in thePATHenvironment variable, as noted in theWinBashStatus.checkdocstring) is a bit tricky because renaming that file requires one to act as theTrustedInstalleruser (as would the worse option of deleting it). At some point while working on #1745, I did not test this when I should have. I believe that is the only reason it was missed, rather than any underlying technical issue.