1
0
Fork 0

Adding upstream version 3.1.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 21:37:46 +01:00
parent 4066ef5157
commit 897eb1bb2a
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
88 changed files with 1083 additions and 974 deletions

View file

@ -134,6 +134,39 @@ def test_migrate_config_sha_to_rev(tmpdir):
)
def test_migrate_config_language_python_venv(tmp_path):
src = '''\
repos:
- repo: local
hooks:
- id: example
name: example
entry: example
language: python_venv
- id: example
name: example
entry: example
language: system
'''
expected = '''\
repos:
- repo: local
hooks:
- id: example
name: example
entry: example
language: python
- id: example
name: example
entry: example
language: system
'''
cfg = tmp_path.joinpath('cfg.yaml')
cfg.write_text(src)
assert migrate_config(str(cfg)) == 0
assert cfg.read_text() == expected
def test_migrate_config_invalid_yaml(tmpdir):
contents = '['
cfg = tmpdir.join(C.CONFIG_FILE)