diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_extensions.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_extensions.py b/tests/test_extensions.py index fa9a801..d9d77b8 100644 --- a/tests/test_extensions.py +++ b/tests/test_extensions.py @@ -199,6 +199,13 @@ class TestHeaderId(unittest.TestCase): self.assertEqual(self.md.convert(text), '<h1 id="some-header">Some Header</h1>') + def testUniqueFunc(self): + """ Test 'unique' function. """ + from markdown.extensions.headerid import unique + ids = set(['foo']) + self.assertEqual(unique('foo', ids), 'foo_1') + self.assertEqual(ids, set(['foo', 'foo_1'])) + def testUniqueIds(self): """ Test Unique IDs. """ |