Title: Improve hooks tests by EliahKagan · Pull Request #1777 · gitpython-developers/GitPython · GitHub
Open Graph Title: Improve hooks tests by EliahKagan · Pull Request #1777 · gitpython-developers/GitPython
X Title: Improve hooks tests by EliahKagan · Pull Request #1777 · gitpython-developers/GitPython
Description: This improves the tests of git hooks in test_index.py: f664a0b fixes and adds missing xfail marks for the WinBashStatus.Absent condition. This is a test bug from when I added the xfail marks in #1745. The Absent condition was detected correctly, but not always used, or used properly, in xfail markings. e148647 adds a direct test of run_commit_hook itself. The other tests test specific kinds of hooks. run_commit_hook is 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 the WinBashStatus.Wsl case, which CI confirms, and the WinBashStatus.Native case). One might worry that I missed this before due to some further bug, but I believe not. Producing a genuine WslBashStatus.Absent condition on a Windows system that has a system-provided WSL-related bash.exe in System32 (which is searched regardless of what is in the PATH environment variable, as noted in the WinBashStatus.check docstring) is a bit tricky because renaming that file requires one to act as the TrustedInstaller user (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.
Open Graph Description: This improves the tests of git hooks in test_index.py: f664a0b fixes and adds missing xfail marks for the WinBashStatus.Absent condition. This is a test bug from when I added the xfail marks in #1...
X Description: This improves the tests of git hooks in test_index.py: f664a0b fixes and adds missing xfail marks for the WinBashStatus.Absent condition. This is a test bug from when I added the xfail marks in #1...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1777
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b431e306-a4e9-256a-dec2-d7caf6c71640 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D44E:1C445E:DD66F2:12CF8CC:69693B94 |
| html-safe-nonce | a3be4aa4bf16c96f5726558123fa90963b637a36f4488bb60cc93a6944666290 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENDRFOjFDNDQ1RTpERDY2RjI6MTJDRjhDQzo2OTY5M0I5NCIsInZpc2l0b3JfaWQiOiI4MDcxNTM1MjA2NTMyMjAxMzY0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6b51141e8e40a842d82e7396f7d68564d371459ec43692e8932b8eee6ab8fea0 |
| hovercard-subject-tag | pull_request:1653275268 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/gitpython-developers/GitPython/pull/1777/files |
| twitter:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| og:image:alt | This improves the tests of git hooks in test_index.py: f664a0b fixes and adds missing xfail marks for the WinBashStatus.Absent condition. This is a test bug from when I added the xfail marks in #1... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width