You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add xfail marks to hook tests for WinBashStatus.Absent
Precise xfail marks were added to commit hook tests in gitpython-developers#1745, but
in a few tests I didn't get it right for WinBashStatus.Absent. That
is, on a Windows system that has no bash.exe at all:
- More of the tests are unable to pass than have xfail marks.
- One of the tests, test_commit_msg_hook_success, which does have
an xfail mark for that, wrongly combines it with the xfail mark
for WinBashStatus.Wsl. That test is the only one where the WSL
bash.exe, even when a working WSL distribution is installed, is
unable to pass. But using a single mark there is wrong, in part
because the "reason" is not correct for both, but even more so
because the exceptions they raise are different: AssertionError
is raised when the WSL bash.exe is used in that test, but when
bash.exe is altogether absent, HookExecutionError is raised.
This fixes that by adding xfail marks for WinBashStatus.Absent
where missing, and splitting test_commit_msg_hook_success's xfail
mark that unsuccessfully tried to cover two conditions into two
separate marks, each of which gives a correct reason and exception.
This commit also rewords the xfail reason given for WslNoDistro,
which was somewhat unclear and potentially ambiguous, to make it
clearer.
0 commit comments