1
0
Fork 0

Merging upstream version 2.3.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 21:19:27 +01:00
parent c869774b2b
commit ac2b33dbed
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
17 changed files with 261 additions and 37 deletions

View file

@ -131,9 +131,9 @@ def test_python_hook(tempdir_factory, store):
def test_python_hook_default_version(tempdir_factory, store):
# make sure that this continues to work for platforms where default
# language detection does not work
with mock.patch.object(
python, 'get_default_version', return_value=C.DEFAULT,
):
returns_default = mock.Mock(return_value=C.DEFAULT)
lang = languages['python']._replace(get_default_version=returns_default)
with mock.patch.dict(languages, python=lang):
test_python_hook(tempdir_factory, store)
@ -243,6 +243,15 @@ def test_run_a_node_hook(tempdir_factory, store):
)
def test_run_a_node_hook_default_version(tempdir_factory, store):
# make sure that this continues to work for platforms where node is not
# installed at the system
returns_default = mock.Mock(return_value=C.DEFAULT)
lang = languages['node']._replace(get_default_version=returns_default)
with mock.patch.dict(languages, node=lang):
test_run_a_node_hook(tempdir_factory, store)
def test_run_versioned_node_hook(tempdir_factory, store):
_test_hook_repo(
tempdir_factory, store, 'node_versioned_hooks_repo',