MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / testRegisterDupplicate

Method testRegisterDupplicate

tests/test_apis.py:350–358  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

348 r.get_index_for_name('c')
349
350 def testRegisterDupplicate(self):
351 r = markdown.util.Registry()
352 r.register(Item('a'), 'a', 20)
353 r.register(Item('b1'), 'b', 10)
354 self.assertEqual(list(r), ['a', 'b1'])
355 self.assertEqual(len(r), 2)
356 r.register(Item('b2'), 'b', 30)
357 self.assertEqual(len(r), 2)
358 self.assertEqual(list(r), ['b2', 'a'])
359
360
361class TestErrors(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

registerMethod · 0.95
ItemClass · 0.85

Tested by

no test coverage detected