summaryrefslogtreecommitdiffstats
path: root/tests/main_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/main_test.py')
-rw-r--r--tests/main_test.py18
1 files changed, 3 insertions, 15 deletions
diff --git a/tests/main_test.py b/tests/main_test.py
index 1ad8d41..a645300 100644
--- a/tests/main_test.py
+++ b/tests/main_test.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import argparse
import os.path
from unittest import mock
@@ -12,20 +14,6 @@ from testing.auto_namedtuple import auto_namedtuple
from testing.util import cwd
-@pytest.mark.parametrize(
- ('argv', 'expected'),
- (
- ((), ['f']),
- (('--f', 'x'), ['x']),
- (('--f', 'x', '--f', 'y'), ['x', 'y']),
- ),
-)
-def test_append_replace_default(argv, expected):
- parser = argparse.ArgumentParser()
- parser.add_argument('--f', action=main.AppendReplaceDefault, default=['f'])
- assert parser.parse_args(argv).f == expected
-
-
def _args(**kwargs):
kwargs.setdefault('command', 'help')
kwargs.setdefault('config', C.CONFIG_FILE)
@@ -170,7 +158,7 @@ def test_init_templatedir(mock_store_dir):
assert patch.call_count == 1
assert 'tdir' in patch.call_args[0]
- assert patch.call_args[1]['hook_types'] == ['pre-commit']
+ assert patch.call_args[1]['hook_types'] is None
assert patch.call_args[1]['skip_on_missing_config'] is True