mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use less readlink for osx peeps.
This commit is contained in:
parent
81c4298e5f
commit
f63fa850c9
2 changed files with 17 additions and 5 deletions
|
|
@ -100,13 +100,23 @@ def _get_commit_output(tmpdir_factory, touch_file='foo'):
|
|||
)[:2]
|
||||
|
||||
|
||||
# osx does this different :(
|
||||
FILES_CHANGED = (
|
||||
r'('
|
||||
r' 1 file changed, 0 insertions\(\+\), 0 deletions\(-\)\n'
|
||||
r'|'
|
||||
r' 0 files changed\n'
|
||||
r')'
|
||||
)
|
||||
|
||||
|
||||
NORMAL_PRE_COMMIT_RUN = re.compile(
|
||||
r'^\[INFO\] Installing environment for .+\.\n'
|
||||
r'\[INFO\] Once installed this environment will be reused\.\n'
|
||||
r'\[INFO\] This may take a few minutes\.\.\.\n'
|
||||
r'Bash hook\.+Passed\n'
|
||||
r'\[master [a-f0-9]{7}\] Commit!\n'
|
||||
r' 0 files changed\n'
|
||||
r'\[master [a-f0-9]{7}\] Commit!\n' +
|
||||
FILES_CHANGED +
|
||||
r' create mode 100644 foo\n$'
|
||||
)
|
||||
|
||||
|
|
@ -174,8 +184,8 @@ def test_failing_hooks_returns_nonzero(tmpdir_factory):
|
|||
|
||||
EXISTING_COMMIT_RUN = re.compile(
|
||||
r'^legacy hook\n'
|
||||
r'\[master [a-f0-9]{7}\] Commit!\n'
|
||||
r' 0 files changed\n'
|
||||
r'\[master [a-f0-9]{7}\] Commit!\n' +
|
||||
FILES_CHANGED +
|
||||
r' create mode 100644 baz\n$'
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue