mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 12:06:53 +00:00
add catch-dotenv hook to README and improve test clarity
This commit is contained in:
parent
3e8b0c9e1a
commit
476396a2b9
3 changed files with 9 additions and 3 deletions
|
|
@ -95,7 +95,7 @@ def test_gitignore_with_existing_content_preserved(
|
|||
g = tmp_path / DEFAULT_GITIGNORE_FILE
|
||||
g.write_text(
|
||||
'node_modules/\n# comment line\n',
|
||||
) # no trailing newline section markers
|
||||
) # existing content with trailing newline
|
||||
run_hook(tmp_path, [DEFAULT_ENV_FILE])
|
||||
lines = g.read_text().splitlines()
|
||||
# original content should still be at top
|
||||
|
|
@ -372,7 +372,7 @@ def test_subdirectory_invocation(
|
|||
os.chdir(sub)
|
||||
try:
|
||||
ret = main(
|
||||
['../' + DEFAULT_ENV_FILE],
|
||||
[str(Path('..') / DEFAULT_ENV_FILE)],
|
||||
) # staged path relative to subdir
|
||||
gi = (sub / DEFAULT_GITIGNORE_FILE).read_text().splitlines()
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue