Don't fail if GPG signing is configured by default. All references.

This commit is contained in:
Pedro Algarvio 2018-12-28 20:06:52 +00:00
parent 7afb2944b2
commit 28c97a95cd
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF
10 changed files with 60 additions and 50 deletions

View file

@ -8,6 +8,7 @@ from pre_commit import git
from pre_commit import make_archives
from pre_commit.util import cmd_output
from testing.fixtures import git_dir
from testing.util import git_commit
def test_make_archive(tempdir_factory):
@ -16,13 +17,13 @@ def test_make_archive(tempdir_factory):
# Add a files to the git directory
open(os.path.join(git_path, 'foo'), 'a').close()
cmd_output('git', 'add', '.', cwd=git_path)
cmd_output('git', 'commit', '-m', 'foo', cwd=git_path)
git_commit('foo', cwd=git_path)
# We'll use this rev
head_rev = git.head_rev(git_path)
# And check that this file doesn't exist
open(os.path.join(git_path, 'bar'), 'a').close()
cmd_output('git', 'add', '.', cwd=git_path)
cmd_output('git', 'commit', '-m', 'bar', cwd=git_path)
git_commit('bar', cwd=git_path)
# Do the thing
archive_path = make_archives.make_archive(