Add test to verify no-warnings config option fails when not boolean
This commit is contained in:
@@ -38,6 +38,11 @@ class SimpleConfigTestCase(unittest.TestCase):
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user