summaryrefslogtreecommitdiffstats
path: root/tests/repository_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/repository_test.py')
-rw-r--r--tests/repository_test.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/tests/repository_test.py b/tests/repository_test.py
index b8dde99..ac065ec 100644
--- a/tests/repository_test.py
+++ b/tests/repository_test.py
@@ -9,7 +9,6 @@ from unittest import mock
import cfgv
import pytest
-import re_assert
import pre_commit.constants as C
from pre_commit import lang_base
@@ -27,7 +26,6 @@ from pre_commit.util import cmd_output
from pre_commit.util import cmd_output_b
from testing.fixtures import make_config_from_repo
from testing.fixtures import make_repo
-from testing.fixtures import modify_manifest
from testing.language_helpers import run_language
from testing.util import cwd
from testing.util import get_resource_path
@@ -433,32 +431,6 @@ def test_hook_id_not_present(tempdir_factory, store, caplog):
)
-def test_too_new_version(tempdir_factory, store, caplog):
- path = make_repo(tempdir_factory, 'script_hooks_repo')
- with modify_manifest(path) as manifest:
- manifest[0]['minimum_pre_commit_version'] = '999.0.0'
- config = make_config_from_repo(path)
- with pytest.raises(SystemExit):
- _get_hook(config, store, 'bash_hook')
- _, msg = caplog.messages
- pattern = re_assert.Matches(
- r'^The hook `bash_hook` requires pre-commit version 999\.0\.0 but '
- r'version \d+\.\d+\.\d+ is installed. '
- r'Perhaps run `pip install --upgrade pre-commit`\.$',
- )
- pattern.assert_matches(msg)
-
-
-@pytest.mark.parametrize('version', ('0.1.0', C.VERSION))
-def test_versions_ok(tempdir_factory, store, version):
- path = make_repo(tempdir_factory, 'script_hooks_repo')
- with modify_manifest(path) as manifest:
- manifest[0]['minimum_pre_commit_version'] = version
- config = make_config_from_repo(path)
- # Should succeed
- _get_hook(config, store, 'bash_hook')
-
-
def test_manifest_hooks(tempdir_factory, store):
path = make_repo(tempdir_factory, 'script_hooks_repo')
config = make_config_from_repo(path)