dvc: add 'repos' list to pre-commit config if it does not exist (#6795)

This commit is contained in:
Michael Lingelbach
2021-10-13 22:50:25 +03:00
committed by GitHub
parent af34f5a0f1
commit 0ae9130052
2 changed files with 9 additions and 0 deletions
+6
View File
@@ -30,6 +30,12 @@ class TestInstall:
assert hook_path.is_file()
assert command in hook_path.read_text()
def test_install_pre_commit_tool(self, scm):
scm.install(use_pre_commit_tool=True)
precommit_path = pathlib.Path(".") / ".pre-commit-config.yaml"
assert precommit_path.is_file()
def test_fail_if_hook_exists(self, scm):
self._hook("post-checkout").write_text("hook content")