diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-12-04 03:57:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-12-04 03:57:49 +0000 |
commit | d6cacb1f6ae346ce54a5116d76a7d087bb6381a5 (patch) | |
tree | fdb6f1b1b847180a234439c3f39ce5d93da8e84e /tests/commands/autoupdate_test.py | |
parent | Adding upstream version 2.15.0. (diff) | |
download | pre-commit-d6cacb1f6ae346ce54a5116d76a7d087bb6381a5.tar.xz pre-commit-d6cacb1f6ae346ce54a5116d76a7d087bb6381a5.zip |
Adding upstream version 2.16.0.upstream/2.16.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/commands/autoupdate_test.py')
-rw-r--r-- | tests/commands/autoupdate_test.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/commands/autoupdate_test.py b/tests/commands/autoupdate_test.py index b2bad60..7316eb9 100644 --- a/tests/commands/autoupdate_test.py +++ b/tests/commands/autoupdate_test.py @@ -5,6 +5,7 @@ import pytest import yaml import pre_commit.constants as C +from pre_commit import envcontext from pre_commit import git from pre_commit import util from pre_commit.commands.autoupdate import _check_hooks_still_exist_at_rev @@ -176,6 +177,14 @@ def test_autoupdate_out_of_date_repo(out_of_date, tmpdir, store): assert cfg.read() == fmt.format(out_of_date.path, out_of_date.head_rev) +def test_autoupdate_with_core_useBuiltinFSMonitor(out_of_date, tmpdir, store): + # force the setting on "globally" for git + home = tmpdir.join('fakehome').ensure_dir() + home.join('.gitconfig').write('[core]\nuseBuiltinFSMonitor = true\n') + with envcontext.envcontext((('HOME', str(home)),)): + test_autoupdate_out_of_date_repo(out_of_date, tmpdir, store) + + def test_autoupdate_pure_yaml(out_of_date, tmpdir, store): with mock.patch.object(util, 'Dumper', yaml.SafeDumper): test_autoupdate_out_of_date_repo(out_of_date, tmpdir, store) |