Adding upstream version 2.17.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
ea92097ba5
commit
9c7f59905e
34 changed files with 336 additions and 116 deletions
38
tests/languages/conda_test.py
Normal file
38
tests/languages/conda_test.py
Normal file
|
@ -0,0 +1,38 @@
|
|||
import pytest
|
||||
|
||||
from pre_commit import envcontext
|
||||
from pre_commit.languages.conda import _conda_exe
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
('ctx', 'expected'),
|
||||
(
|
||||
pytest.param(
|
||||
(
|
||||
('PRE_COMMIT_USE_MICROMAMBA', envcontext.UNSET),
|
||||
('PRE_COMMIT_USE_MAMBA', envcontext.UNSET),
|
||||
),
|
||||
'conda',
|
||||
id='default',
|
||||
),
|
||||
pytest.param(
|
||||
(
|
||||
('PRE_COMMIT_USE_MICROMAMBA', '1'),
|
||||
('PRE_COMMIT_USE_MAMBA', ''),
|
||||
),
|
||||
'micromamba',
|
||||
id='default',
|
||||
),
|
||||
pytest.param(
|
||||
(
|
||||
('PRE_COMMIT_USE_MICROMAMBA', ''),
|
||||
('PRE_COMMIT_USE_MAMBA', '1'),
|
||||
),
|
||||
'mamba',
|
||||
id='default',
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_conda_exe(ctx, expected):
|
||||
with envcontext.envcontext(ctx):
|
||||
assert _conda_exe() == expected
|
Loading…
Add table
Add a link
Reference in a new issue