aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_apis.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2014-08-25 10:43:50 -0400
committerWaylan Limberg <waylan.limberg@icloud.com>2014-08-25 10:43:50 -0400
commited661f74428670df810d4d702cd31c760693b455 (patch)
treea5d6868d5090bfaad673721c208f7baec796fc7b /tests/test_apis.py
parentd7e0f99babd33700aa02edd4760deab800c8b5b1 (diff)
downloadmarkdown-ed661f74428670df810d4d702cd31c760693b455.tar.gz
markdown-ed661f74428670df810d4d702cd31c760693b455.tar.bz2
markdown-ed661f74428670df810d4d702cd31c760693b455.zip
Fixed a bug in markdown.util.parseBoolValue
A couple scenarios with "None" were previously not accounted for. Also updated tests which guives us 100% for markdown/util.py
Diffstat (limited to 'tests/test_apis.py')
-rw-r--r--tests/test_apis.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py
index e99f606..a5e0d73 100644
--- a/tests/test_apis.py
+++ b/tests/test_apis.py
@@ -455,6 +455,11 @@ class TestConfigParsing(unittest.TestCase):
self.assertParses('yES', True)
self.assertParses('FALSE', False)
self.assertParses(0., False)
+ self.assertParses('none', False)
+
+ def testPreserveNone(self):
+ self.assertTrue(markdown.util.parseBoolValue('None', preserve_none=True) is None)
+ self.assertTrue(markdown.util.parseBoolValue(None, preserve_none=True) is None)
def testInvalidBooleansParsing(self):
self.assertRaises(ValueError, markdown.util.parseBoolValue, 'novalue')