summaryrefslogtreecommitdiffstats
path: root/tests/repository_test.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/repository_test.py26
1 files changed, 4 insertions, 22 deletions
diff --git a/tests/repository_test.py b/tests/repository_test.py
index ac065ec..b54c910 100644
--- a/tests/repository_test.py
+++ b/tests/repository_test.py
@@ -80,24 +80,6 @@ def _test_hook_repo(
assert out == expected
-def test_python_venv_deprecation(store, caplog):
- config = {
- 'repo': 'local',
- 'hooks': [{
- 'id': 'example',
- 'name': 'example',
- 'language': 'python_venv',
- 'entry': 'echo hi',
- }],
- }
- _get_hook(config, store, 'example')
- assert caplog.messages[-1] == (
- '`repo: local` uses deprecated `language: python_venv`. '
- 'This is an alias for `language: python`. '
- 'Often `pre-commit autoupdate --repo local` will fix this.'
- )
-
-
def test_system_hook_with_spaces(tempdir_factory, store):
_test_hook_repo(
tempdir_factory, store, 'system_hook_with_spaces_repo',
@@ -240,16 +222,16 @@ def test_unknown_keys(store, caplog):
assert msg == 'Unexpected key(s) present on local => too-much: foo, hello'
-def test_reinstall(tempdir_factory, store, log_info_mock):
+def test_reinstall(tempdir_factory, store, caplog):
path = make_repo(tempdir_factory, 'python_hooks_repo')
config = make_config_from_repo(path)
_get_hook(config, store, 'foo')
# We print some logging during clone (1) + install (3)
- assert log_info_mock.call_count == 4
- log_info_mock.reset_mock()
+ assert len(caplog.record_tuples) == 4
+ caplog.clear()
# Reinstall on another run should not trigger another install
_get_hook(config, store, 'foo')
- assert log_info_mock.call_count == 0
+ assert len(caplog.record_tuples) == 0
def test_control_c_control_c_on_install(tempdir_factory, store):