aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_apis.py
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2013-09-29 14:31:29 -0700
committerWaylan Limberg <waylan@gmail.com>2013-09-29 14:31:29 -0700
commit191d88b26c6bcb1cd9f66cb3a115e106366d1a55 (patch)
tree93804de49534fe52fd38f15e8cb0b39e08650a92 /tests/test_apis.py
parent62e5485c0f4292717f48b4c16cdd6894c891716f (diff)
parent635d2f71db191145d30cba4934ab7fa8f4d20509 (diff)
downloadmarkdown-191d88b26c6bcb1cd9f66cb3a115e106366d1a55.tar.gz
markdown-191d88b26c6bcb1cd9f66cb3a115e106366d1a55.tar.bz2
markdown-191d88b26c6bcb1cd9f66cb3a115e106366d1a55.zip
Merge pull request #252 from mitya57/master
Enable anchorlinks in Python-Markdown documentation
Diffstat (limited to 'tests/test_apis.py')
-rw-r--r--tests/test_apis.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_apis.py b/tests/test_apis.py
index bbe165d..a7d6685 100644
--- a/tests/test_apis.py
+++ b/tests/test_apis.py
@@ -420,3 +420,16 @@ class testAtomicString(unittest.TestCase):
'<div><p>*some* <span>*more* <span>*text* <span>*here*</span> '
'*to*</span> *test*</span> *with*</p></div>')
+class TestConfigParsing(unittest.TestCase):
+ def assertParses(self, value, result):
+ self.assertIs(markdown.util.parseBoolValue(value, False), result)
+
+ def testBooleansParsing(self):
+ self.assertParses(True, True)
+ self.assertParses('novalue', None)
+ self.assertParses('yES', True)
+ self.assertParses('FALSE', False)
+ self.assertParses(0., False)
+
+ def testInvalidBooleansParsing(self):
+ self.assertRaises(ValueError, markdown.util.parseBoolValue, 'novalue')