mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
add support for dart as a hook language
This commit is contained in:
parent
0f08ba77c8
commit
f8e21cb78b
19 changed files with 227 additions and 29 deletions
|
|
@ -9,6 +9,7 @@ from pre_commit.envcontext import envcontext
|
|||
from pre_commit.languages import python
|
||||
from pre_commit.prefix import Prefix
|
||||
from pre_commit.util import make_executable
|
||||
from pre_commit.util import win_exe
|
||||
|
||||
|
||||
def test_read_pyvenv_cfg(tmpdir):
|
||||
|
|
@ -112,7 +113,7 @@ def test_unhealthy_python_goes_missing(python_dir):
|
|||
|
||||
python.install_environment(prefix, C.DEFAULT, ())
|
||||
|
||||
exe_name = 'python' if sys.platform != 'win32' else 'python.exe'
|
||||
exe_name = win_exe('python')
|
||||
py_exe = prefix.path(python.bin_dir('py_env-default'), exe_name)
|
||||
os.remove(py_exe)
|
||||
|
||||
|
|
@ -158,7 +159,7 @@ def test_unhealthy_then_replaced(python_dir):
|
|||
python.install_environment(prefix, C.DEFAULT, ())
|
||||
|
||||
# simulate an exe which returns an old version
|
||||
exe_name = 'python.exe' if sys.platform == 'win32' else 'python'
|
||||
exe_name = win_exe('python')
|
||||
py_exe = prefix.path(python.bin_dir('py_env-default'), exe_name)
|
||||
os.rename(py_exe, f'{py_exe}.tmp')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue