mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #2767 from pre-commit/test-more-directly
test things more directly to improve coverage
This commit is contained in:
commit
4f6ba18cad
4 changed files with 46 additions and 16 deletions
|
|
@ -143,22 +143,6 @@ def test_python_venv_deprecation(store, caplog):
|
|||
)
|
||||
|
||||
|
||||
def test_language_versioned_python_hook(tempdir_factory, store):
|
||||
# we patch this force virtualenv executing with `-p` since we can't
|
||||
# reliably have multiple pythons available in CI
|
||||
with mock.patch.object(
|
||||
python,
|
||||
'_sys_executable_matches',
|
||||
return_value=False,
|
||||
):
|
||||
_test_hook_repo(
|
||||
tempdir_factory, store, 'python3_hooks_repo',
|
||||
'python3-hook',
|
||||
[os.devnull],
|
||||
f'3\n[{os.devnull!r}]\nHello World\n'.encode(),
|
||||
)
|
||||
|
||||
|
||||
def test_system_hook_with_spaces(tempdir_factory, store):
|
||||
_test_hook_repo(
|
||||
tempdir_factory, store, 'system_hook_with_spaces_repo',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue