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

Method testRegisterDupplicate

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

Source from the content-addressed store, hash-verified

372 r.get_index_for_name('c')
373
374 def testRegisterDupplicate(self):
375 r = markdown.util.Registry()
376 r.register(Item('a'), 'a', 20)
377 r.register(Item('b1'), 'b', 10)
378 self.assertEqual(list(r), ['a', 'b1'])
379 self.assertEqual(len(r), 2)
380 r.register(Item('b2'), 'b', 30)
381 self.assertEqual(len(r), 2)
382 self.assertEqual(list(r), ['b2', 'a'])
383
384
385class TestErrors(unittest.TestCase):

Callers

nothing calls this directly

Calls 2

registerMethod · 0.95
ItemClass · 0.85

Tested by

no test coverage detected