pre-commit: improve test (#21443)
Now covers: - `PYTHONPATH` based setup - relative virtualenv symlinks
This commit is contained in:
parent
ee0ac4f97f
commit
ccbb24b753
1 changed files with 10 additions and 1 deletions
|
@ -47,7 +47,16 @@ class PreCommit < Formula
|
|||
- id: trailing-whitespace
|
||||
EOS
|
||||
system bin/"pre-commit", "install"
|
||||
system bin/"pre-commit", "run", "--all-files"
|
||||
(testpath/"f").write "hi\n"
|
||||
system "git", "add", "f"
|
||||
|
||||
ENV["GIT_AUTHOR_NAME"] = "test user"
|
||||
ENV["GIT_AUTHOR_EMAIL"] = "test@example.com"
|
||||
ENV["GIT_COMMITTER_NAME"] = "test user"
|
||||
ENV["GIT_COMMITTER_EMAIL"] = "test@example.com"
|
||||
git_exe = which("git")
|
||||
ENV["PATH"] = "/usr/bin:/bin"
|
||||
system git_exe, "commit", "-m", "test"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue