Move most of the actual hook script into pre-commit hook-impl

This commit is contained in:
Anthony Sottile 2020-01-20 13:32:33 -08:00
parent 93152218a7
commit 95b8d71bd9
10 changed files with 471 additions and 201 deletions

View file

@ -51,7 +51,8 @@ def test_shebang_posix_not_on_path():
def test_shebang_posix_on_path(tmpdir):
tmpdir.join(f'python{sys.version_info[0]}').ensure()
exe = tmpdir.join(f'python{sys.version_info[0]}').ensure()
make_executable(exe)
with mock.patch.object(sys, 'platform', 'posix'):
with mock.patch.object(os, 'defpath', tmpdir.strpath):