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

Method testRegistryGetItemByIndex

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

Source from the content-addressed store, hash-verified

296 self.assertEqual(list(r), ['b', 'a'])
297
298 def testRegistryGetItemByIndex(self):
299 r = markdown.util.Registry()
300 r.register(Item('a'), 'a', 20)
301 r.register(Item('b'), 'b', 30)
302 self.assertEqual(r[0], 'b')
303 self.assertEqual(r[1], 'a')
304 with self.assertRaises(IndexError):
305 r[3]
306
307 def testRegistryGetItemByItem(self):
308 r = markdown.util.Registry()

Callers

nothing calls this directly

Calls 2

registerMethod · 0.95
ItemClass · 0.85

Tested by

no test coverage detected