Skip to content

Commit a941fb4

Browse files
author
Yuki Kobayashi
committed
Add a test
1 parent 84366fb commit a941fb4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ class Rule:
197197
{'multiple': ['item4']})
198198

199199
def test_invalid_rule(self):
200+
with self.assertRaisesRegex(
201+
config.YamlLintConfigError,
202+
'invalid config: rules should be a dict'):
203+
config.YamlLintConfig('rules:\n')
200204
with self.assertRaisesRegex(
201205
config.YamlLintConfigError,
202206
'invalid config: rule "colons": should be either '

0 commit comments

Comments
 (0)