mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 00:04:42 +04:00
Don't fail if GPG signing is configured by default. All references.
This commit is contained in:
parent
7afb2944b2
commit
28c97a95cd
10 changed files with 60 additions and 50 deletions
|
|
@ -9,6 +9,7 @@ import pytest
|
|||
from pre_commit import git
|
||||
from pre_commit.error_handler import FatalError
|
||||
from pre_commit.util import cmd_output
|
||||
from testing.util import git_commit
|
||||
|
||||
|
||||
def test_get_root_at_root(in_git_dir):
|
||||
|
|
@ -104,11 +105,11 @@ def test_parse_merge_msg_for_conflicts(input, expected_output):
|
|||
|
||||
|
||||
def test_get_changed_files(in_git_dir):
|
||||
cmd_output('git', 'commit', '--allow-empty', '-m', 'initial commit')
|
||||
git_commit('initial commit')
|
||||
in_git_dir.join('a.txt').ensure()
|
||||
in_git_dir.join('b.txt').ensure()
|
||||
cmd_output('git', 'add', '.')
|
||||
cmd_output('git', 'commit', '-m', 'add some files')
|
||||
git_commit('add some files')
|
||||
files = git.get_changed_files('HEAD', 'HEAD^')
|
||||
assert files == ['a.txt', 'b.txt']
|
||||
|
||||
|
|
@ -132,10 +133,10 @@ def test_zsplit(s, expected):
|
|||
|
||||
@pytest.fixture
|
||||
def non_ascii_repo(in_git_dir):
|
||||
cmd_output('git', 'commit', '--allow-empty', '-m', 'initial commit')
|
||||
git_commit('initial commit')
|
||||
in_git_dir.join('интервью').ensure()
|
||||
cmd_output('git', 'add', '.')
|
||||
cmd_output('git', 'commit', '--allow-empty', '-m', 'initial commit')
|
||||
git_commit('initial commit')
|
||||
yield in_git_dir
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue