Add config test

This commit is contained in:
Joel Baranick
2020-12-21 09:04:08 -08:00
parent a9ea6485e3
commit de09a23b2c

View File

@@ -28,6 +28,16 @@ from yamllint import config
class SimpleConfigTestCase(unittest.TestCase): class SimpleConfigTestCase(unittest.TestCase):
def test_no_warnings_config(self):
new = config.YamlLintConfig('extends: default')
self.assertFalse(new.no_warnings)
new = config.YamlLintConfig('no-warnings: false')
self.assertFalse(new.no_warnings)
new = config.YamlLintConfig('no-warnings: true')
self.assertTrue(new.no_warnings)
def test_parse_config(self): def test_parse_config(self):
new = config.YamlLintConfig('rules:\n' new = config.YamlLintConfig('rules:\n'
' colons:\n' ' colons:\n'