Minor fixes

This commit is contained in:
Anthony Sottile 2017-11-06 18:14:59 -08:00
parent 70e7d9c5c4
commit fccb4e6935
2 changed files with 4 additions and 6 deletions

View file

@ -168,10 +168,7 @@ def main(argv=None):
), ),
) )
autoupdate_parser.add_argument( autoupdate_parser.add_argument(
'--repo', nargs=1, default=None, '--repo', help='Only update this repository.',
help=(
'Repository to update the hooks of.'
),
) )
migrate_config_parser = subparsers.add_parser( migrate_config_parser = subparsers.add_parser(

View file

@ -123,6 +123,7 @@ def test_autoupdate_out_of_date_repo(
assert 'exclude' not in after assert 'exclude' not in after
assert out_of_date_repo.head_sha in after assert out_of_date_repo.head_sha in after
def test_autoupdate_out_of_date_repo_with_correct_repo_name( def test_autoupdate_out_of_date_repo_with_correct_repo_name(
out_of_date_repo, in_tmpdir, mock_out_store_directory, out_of_date_repo, in_tmpdir, mock_out_store_directory,
): ):
@ -139,10 +140,9 @@ def test_autoupdate_out_of_date_repo_with_correct_repo_name(
after = open(C.CONFIG_FILE).read() after = open(C.CONFIG_FILE).read()
assert ret == 0 assert ret == 0
assert before != after assert before != after
# Make sure we don't add defaults
assert 'exclude' not in after
assert out_of_date_repo.head_sha in after assert out_of_date_repo.head_sha in after
def test_autoupdate_out_of_date_repo_with_wrong_repo_name( def test_autoupdate_out_of_date_repo_with_wrong_repo_name(
out_of_date_repo, in_tmpdir, mock_out_store_directory, out_of_date_repo, in_tmpdir, mock_out_store_directory,
): ):
@ -160,6 +160,7 @@ def test_autoupdate_out_of_date_repo_with_wrong_repo_name(
assert ret == 0 assert ret == 0
assert before == after assert before == after
def test_does_not_reformat( def test_does_not_reformat(
out_of_date_repo, mock_out_store_directory, in_tmpdir, out_of_date_repo, mock_out_store_directory, in_tmpdir,
): ):