diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-09-29 14:31:29 -0700 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-09-29 14:31:29 -0700 |
commit | 191d88b26c6bcb1cd9f66cb3a115e106366d1a55 (patch) | |
tree | 93804de49534fe52fd38f15e8cb0b39e08650a92 /tests/test_apis.py | |
parent | 62e5485c0f4292717f48b4c16cdd6894c891716f (diff) | |
parent | 635d2f71db191145d30cba4934ab7fa8f4d20509 (diff) | |
download | markdown-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.py | 13 |
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') |