Tests: config: Check the non-valid-yaml-config case

This commit is contained in:
Adrien Vergé 2016-03-22 20:32:28 +01:00
parent 29aceb430a
commit 08615ec4f8

View File

@ -32,6 +32,10 @@ class SimpleConfigTestCase(unittest.TestCase):
self.assertEqual(len(new.enabled_rules()), 1)
def test_invalid_conf(self):
with self.assertRaises(config.YamlLintConfigError):
config.YamlLintConfig('not: valid: yaml')
def test_unknown_rule(self):
with self.assertRaisesRegexp(
config.YamlLintConfigError,