mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add test for python_venv language
This commit is contained in:
parent
e8954e2bf3
commit
b5af5a5b27
12 changed files with 55 additions and 15 deletions
|
|
@ -33,6 +33,7 @@ from testing.util import skipif_cant_run_docker
|
|||
from testing.util import skipif_cant_run_swift
|
||||
from testing.util import xfailif_broken_deep_listdir
|
||||
from testing.util import xfailif_no_pcre_support
|
||||
from testing.util import xfailif_no_venv
|
||||
from testing.util import xfailif_windows_no_ruby
|
||||
|
||||
|
||||
|
|
@ -111,6 +112,15 @@ def test_python_hook_weird_setup_cfg(tempdir_factory, store):
|
|||
)
|
||||
|
||||
|
||||
@xfailif_no_venv
|
||||
def test_python_venv(tempdir_factory, store): # pragma: no cover (no venv)
|
||||
_test_hook_repo(
|
||||
tempdir_factory, store, 'python_venv_hooks_repo',
|
||||
'foo', [os.devnull],
|
||||
b"['" + five.to_bytes(os.devnull) + b"']\nHello World\n",
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.integration
|
||||
def test_switch_language_versions_doesnt_clobber(tempdir_factory, store):
|
||||
# We're using the python3 repo because it prints the python version
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue