mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04: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
|
|
@ -78,6 +78,20 @@ xfailif_no_symlink = pytest.mark.xfail(
|
|||
)
|
||||
|
||||
|
||||
def supports_venv(): # pragma: no cover (platform specific)
|
||||
try:
|
||||
__import__('ensurepip')
|
||||
__import__('venv')
|
||||
return True
|
||||
except ImportError:
|
||||
return False
|
||||
|
||||
|
||||
xfailif_no_venv = pytest.mark.xfail(
|
||||
not supports_venv(), reason='Does not support venv module',
|
||||
)
|
||||
|
||||
|
||||
def run_opts(
|
||||
all_files=False,
|
||||
files=(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue