@@ -167,9 +167,10 @@ def test_config_force_with_update_specs(self, yaml_mock):
167167 self .assertEqual (config .update_specs , True )
168168
169169 @patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
170- def test_config_expand_paths (self , yaml_mock ):
170+ @patch ("sys.stdin.isatty" , return_va = True )
171+ def test_config_expand_paths (self , isatty_mock , yaml_mock ):
171172 """Test precedence in"""
172-
173+ isatty_mock . return_value = True
173174 yaml_mock .side_effect = [
174175 {"templates" : ["test/fixtures/templates/public/*.yaml" ]},
175176 {},
@@ -198,10 +199,12 @@ def test_config_expand_paths(self, yaml_mock):
198199 )
199200
200201 @patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
201- def test_config_expand_paths_nomatch (self , yaml_mock ):
202+ @patch ("sys.stdin.isatty" , return_va = True )
203+ def test_config_expand_paths_nomatch (self , isatty_mock , yaml_mock ):
202204 """Test precedence in"""
203205
204206 filename = "test/fixtures/templates/nonexistant/*.yaml"
207+ isatty_mock .return_value = True
205208 yaml_mock .side_effect = [
206209 {"templates" : [filename ]},
207210 {},
@@ -212,10 +215,14 @@ def test_config_expand_paths_nomatch(self, yaml_mock):
212215 self .assertEqual (len (config .templates ), 1 )
213216
214217 @patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
215- def test_config_expand_paths_nomatch_ignore_bad_template (self , yaml_mock ):
218+ @patch ("sys.stdin.isatty" , return_va = True )
219+ def test_config_expand_paths_nomatch_ignore_bad_template (
220+ self , isatty_mock , yaml_mock
221+ ):
216222 """Test precedence in"""
217223
218224 filename = "test/fixtures/templates/nonexistant/*.yaml"
225+ isatty_mock .return_value = True
219226 yaml_mock .side_effect = [
220227 {"templates" : [filename ], "ignore_bad_template" : True },
221228 {},
@@ -226,9 +233,10 @@ def test_config_expand_paths_nomatch_ignore_bad_template(self, yaml_mock):
226233 self .assertEqual (config .templates , [])
227234
228235 @patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
229- def test_config_expand_ignore_templates (self , yaml_mock ):
236+ @patch ("sys.stdin.isatty" , return_va = True )
237+ def test_config_expand_ignore_templates (self , isatty_mock , yaml_mock ):
230238 """Test ignore templates"""
231-
239+ isatty_mock . return_value = True
232240 yaml_mock .side_effect = [
233241 {
234242 "templates" : ["test/fixtures/templates/bad/resources/iam/*.yaml" ],
@@ -248,9 +256,13 @@ def test_config_expand_ignore_templates(self, yaml_mock):
248256 self .assertEqual (len (config .templates ), 3 )
249257
250258 @patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
251- def test_config_expand_and_ignore_templates_with_bad_path (self , yaml_mock ):
259+ @patch ("sys.stdin.isatty" , return_va = True )
260+ def test_config_expand_and_ignore_templates_with_bad_path (
261+ self , isatty_mock , yaml_mock
262+ ):
252263 """Test ignore templates"""
253264
265+ isatty_mock .return_value = True
254266 yaml_mock .side_effect = [
255267 {
256268 "templates" : ["test/fixtures/templates/bad/resources/iam/*.yaml" ],
@@ -270,9 +282,11 @@ def test_config_expand_and_ignore_templates_with_bad_path(self, yaml_mock):
270282 self .assertEqual (len (config .templates ), 4 )
271283
272284 @patch ("cfnlint.config.ConfigFileArgs._read_config" , create = True )
273- def test_config_merge (self , yaml_mock ):
285+ @patch ("sys.stdin.isatty" , return_va = True )
286+ def test_config_merge (self , isatty_mock , yaml_mock ):
274287 """Test merging lists"""
275288
289+ isatty_mock .return_value = True
276290 yaml_mock .side_effect = [
277291 {
278292 "include_checks" : ["I" ],
0 commit comments