From 5294ff5552c27ea56ab5e13022dff5f9349e4254 Mon Sep 17 00:00:00 2001 From: Peter Ericson Date: Sat, 1 Oct 2016 10:01:51 +1000 Subject: [PATCH] truthy: Add tests for explicit booleans From @adrienverge --- tests/rules/test_truthy.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/rules/test_truthy.py b/tests/rules/test_truthy.py index bb16a0c..949fdd4 100644 --- a/tests/rules/test_truthy.py +++ b/tests/rules/test_truthy.py @@ -38,3 +38,16 @@ class TruthyTestCase(RuleTestCase): self.check('---\n' '"True": 1\n', conf) + def test_explicit_boolean(self): + conf = 'truthy: enable\n' + self.check('---\n' + '!!seq [\n' + ' !!bool true, !!bool false,\n' + ' !!bool "false", !!bool "FALSE",\n' + ' !!bool "true", !!bool "True",\n' + ' !!bool "false", !!bool "FALSE",\n' + ']\n', conf) + self.check('---\n' + '!!seq [\n' + ' !!bool true, !!bool True,\n' + ']\n', conf, problem=(3, 23))