Simplify/clarify bash.exe check for hook tests; do it only once · gitpython-developers/GitPython@b215357 · GitHub
Skip to content

Commit b215357

Browse files
committed
Simplify/clarify bash.exe check for hook tests; do it only once
- Make the design of the enum simpler. - Move some informaton to the check method's docstring. - Call the method once instead of in each decoration. Doing the check only once makes things a little faster, but the more important reason is that the checks can become stale very quickly in some situations. This is unlikely to be an issue on CI, but locally WSL may fail (or not fail) to start up when bash.exe is used in a check, then not fail (or fail) when actaully needed in the test, if the reason it fails is due to resource usage, such as most RAM being used on the system. Although this seems like a reason to do the check multiple times, doing it multiple times in the decorations still does it ahead of when any of the tests is actually run. In contrast, with the change here, we may get outdated results by the time the tests run, but the xfail effects of the check are always consistent with each other and are no longer written in a way that suggests they are more current than they really are.
1 parent 5d11394 commit b215357

1 file changed

Lines changed: 38 additions & 35 deletions

File tree

test/test_index.py

Lines changed: 38 additions & 35 deletions

0 commit comments

Comments
 (0)