Make tests pass

This commit is contained in:
Daniel Gallagher 2017-06-23 15:10:10 -07:00
parent b941d0e6df
commit 05d9c8c805
2 changed files with 1 additions and 19 deletions

View file

@ -110,7 +110,7 @@
description: Sort the lines in specified files (defaults to alphabetical). You must provide list of target files as input in your .pre-commit-config.yaml file.
entry: file-contents-sorter
language: python
files: ''
files: '^$'
- id: fix-encoding-pragma
name: Fix python encoding pragma
language: python

View file

@ -2,7 +2,6 @@ import pytest
from pre_commit_hooks.file_contents_sorter import FAIL
from pre_commit_hooks.file_contents_sorter import main
from pre_commit_hooks.file_contents_sorter import parse_commandline_input
from pre_commit_hooks.file_contents_sorter import PASS
@ -29,20 +28,3 @@ def test_integration(input_s, expected_retval, output, tmpdir):
assert path.read_binary() == output
assert output_retval == expected_retval
def test_parse_commandline_input_errors_without_args():
with pytest.raises(SystemExit):
parse_commandline_input([])
@pytest.mark.parametrize(
('filename_list'),
(
['filename1'],
['filename1', 'filename2'],
)
)
def test_parse_commandline_input_success(filename_list):
args = parse_commandline_input(filename_list)
assert args.filenames == filename_list