@@ -60,15 +60,15 @@ def test_validate_config_main(args, expected_output):
6060 ('config_obj' , 'expected' ), (
6161 ([], False ),
6262 (
63- [{
63+ { 'repos' : [{
6464 'repo' : '[email protected] :pre-commit/pre-commit-hooks' , 6565 'sha' : 'cd74dc150c142c3be70b24eaf0b02cae9d235f37' ,
6666 'hooks' : [{'id' : 'pyflakes' , 'files' : '\\ .py$' }],
67- }],
67+ }]} ,
6868 True ,
6969 ),
7070 (
71- [{
71+ { 'repos' : [{
7272 'repo' : '[email protected] :pre-commit/pre-commit-hooks' , 7373 'sha' : 'cd74dc150c142c3be70b24eaf0b02cae9d235f37' ,
7474 'hooks' : [
@@ -78,11 +78,11 @@ def test_validate_config_main(args, expected_output):
7878 'args' : ['foo' , 'bar' , 'baz' ],
7979 },
8080 ],
81- }],
81+ }]} ,
8282 True ,
8383 ),
8484 (
85- [{
85+ { 'repos' : [{
8686 'repo' : '[email protected] :pre-commit/pre-commit-hooks' , 8787 'sha' : 'cd74dc150c142c3be70b24eaf0b02cae9d235f37' ,
8888 'hooks' : [
@@ -94,7 +94,7 @@ def test_validate_config_main(args, expected_output):
9494 'args' : ['foo' , 'bar' , 'baz' ],
9595 },
9696 ],
97- }],
97+ }]} ,
9898 False ,
9999 ),
100100 ),
@@ -104,29 +104,25 @@ def test_config_valid(config_obj, expected):
104104 assert ret is expected
105105
106106
107- @pytest .mark .parametrize (
108- 'config_obj' , (
109- [{
110- 'repo' : 'local' ,
111- 'sha' : 'foo' ,
112- 'hooks' : [{
113- 'id' : 'do_not_commit' ,
114- 'name' : 'Block if "DO NOT COMMIT" is found' ,
115- 'entry' : 'DO NOT COMMIT' ,
116- 'language' : 'pcre' ,
117- 'files' : '^(.*)$' ,
118- }],
107+ def test_config_with_local_hooks_definition_fails ():
108+ config_obj = {'repos' : [{
109+ 'repo' : 'local' ,
110+ 'sha' : 'foo' ,
111+ 'hooks' : [{
112+ 'id' : 'do_not_commit' ,
113+ 'name' : 'Block if "DO NOT COMMIT" is found' ,
114+ 'entry' : 'DO NOT COMMIT' ,
115+ 'language' : 'pcre' ,
116+ 'files' : '^(.*)$' ,
119117 }],
120- ),
121- )
122- def test_config_with_local_hooks_definition_fails (config_obj ):
118+ }]}
123119 with pytest .raises (schema .ValidationError ):
124120 schema .validate (config_obj , CONFIG_SCHEMA )
125121
126122
127123@pytest .mark .parametrize (
128124 'config_obj' , (
129- [{
125+ { 'repos' : [{
130126 'repo' : 'local' ,
131127 'hooks' : [{
132128 'id' : 'arg-per-line' ,
@@ -136,8 +132,8 @@ def test_config_with_local_hooks_definition_fails(config_obj):
136132 'files' : '' ,
137133 'args' : ['hello' , 'world' ],
138134 }],
139- }],
140- [{
135+ }]} ,
136+ { 'repos' : [{
141137 'repo' : 'local' ,
142138 'hooks' : [{
143139 'id' : 'arg-per-line' ,
@@ -147,7 +143,7 @@ def test_config_with_local_hooks_definition_fails(config_obj):
147143 'files' : '' ,
148144 'args' : ['hello' , 'world' ],
149145 }],
150- }],
146+ }]} ,
151147 ),
152148)
153149def test_config_with_local_hooks_definition_passes (config_obj ):
0 commit comments