From 08615ec4f87d1c727e1abba28bda5254d965dd09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Verg=C3=A9?= Date: Tue, 22 Mar 2016 20:32:28 +0100 Subject: [PATCH] Tests: config: Check the non-valid-yaml-config case --- tests/test_config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_config.py b/tests/test_config.py index 2c537e2..ef93ec7 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -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,