From 05d9c8c8051446dc14aec45a859f39ae22c01bdb Mon Sep 17 00:00:00 2001 From: Daniel Gallagher Date: Fri, 23 Jun 2017 15:10:10 -0700 Subject: [PATCH] Make tests pass --- hooks.yaml | 2 +- tests/file_contents_sorter_test.py | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/hooks.yaml b/hooks.yaml index d501d50..eea7bed 100644 --- a/hooks.yaml +++ b/hooks.yaml @@ -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 diff --git a/tests/file_contents_sorter_test.py b/tests/file_contents_sorter_test.py index e8f1ea8..7b3d098 100644 --- a/tests/file_contents_sorter_test.py +++ b/tests/file_contents_sorter_test.py @@ -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