Skip to content

Commit

Permalink
Add test to verify no-warnings config option fails when not boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Baranick committed Dec 21, 2020
1 parent 5a0617c commit 11e5b12
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ def test_no_warnings_config(self):
new = config.YamlLintConfig('no-warnings: true')
self.assertTrue(new.no_warnings)

with self.assertRaisesRegex(
config.YamlLintConfigError,
'invalid config: no-warnings should be a bool'):
config.YamlLintConfig('no-warnings: foobar')

def test_parse_config(self):
new = config.YamlLintConfig('rules:\n'
' colons:\n'
Expand Down

0 comments on commit 11e5b12

Please sign in to comment.