Skip to content

Commit 05d9c8c

Browse files
author
Daniel Gallagher
committed
Make tests pass
1 parent b941d0e commit 05d9c8c

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
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.
111111
entry: file-contents-sorter
112112
language: python
113-
files: ''
113+
files: '^$'
114114
- id: fix-encoding-pragma
115115
name: Fix python encoding pragma
116116
language: python

tests/file_contents_sorter_test.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from pre_commit_hooks.file_contents_sorter import FAIL
44
from pre_commit_hooks.file_contents_sorter import main
5-
from pre_commit_hooks.file_contents_sorter import parse_commandline_input
65
from pre_commit_hooks.file_contents_sorter import PASS
76

87

@@ -29,20 +28,3 @@ def test_integration(input_s, expected_retval, output, tmpdir):
2928

3029
assert path.read_binary() == output
3130
assert output_retval == expected_retval
32-
33-
34-
def test_parse_commandline_input_errors_without_args():
35-
with pytest.raises(SystemExit):
36-
parse_commandline_input([])
37-
38-
39-
@pytest.mark.parametrize(
40-
('filename_list'),
41-
(
42-
['filename1'],
43-
['filename1', 'filename2'],
44-
)
45-
)
46-
def test_parse_commandline_input_success(filename_list):
47-
args = parse_commandline_input(filename_list)
48-
assert args.filenames == filename_list

0 commit comments

Comments
 (0)