Skip to content

Commit

Permalink
tests: Speed up tests a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Mar 31, 2024
1 parent f9c91f1 commit 2e017e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
class GitRepo:
"""Test utility class to initalize and work with a Git repository."""

_git_exec = shutil.which("git") or "git"

def __init__(self, repo: Path) -> None:
"""Initialization the Git repository wrapper.
Expand All @@ -43,7 +45,7 @@ def git(self, *args: str) -> str:
The output of the command.
"""
return subprocess.check_output(
[shutil.which("git") or "git", "-C", str(self.path), *args], # noqa: S603
[self._git_exec, "-C", str(self.path), *args], # noqa: S603
text=True,
)

Expand Down

0 comments on commit 2e017e9

Please sign in to comment.