|
|
@ -38,6 +38,11 @@ class SimpleConfigTestCase(unittest.TestCase):
|
|
|
|
new = config.YamlLintConfig('no-warnings: true')
|
|
|
|
new = config.YamlLintConfig('no-warnings: true')
|
|
|
|
self.assertTrue(new.no_warnings)
|
|
|
|
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):
|
|
|
|
def test_parse_config(self):
|
|
|
|
new = config.YamlLintConfig('rules:\n'
|
|
|
|
new = config.YamlLintConfig('rules:\n'
|
|
|
|
' colons:\n'
|
|
|
|
' colons:\n'
|
|
|
|