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

Method testRegistryGetItemByIndex

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

Source from the content-addressed store, hash-verified

320 self.assertEqual(list(r), ['b', 'a'])
321
322 def testRegistryGetItemByIndex(self):
323 r = markdown.util.Registry()
324 r.register(Item('a'), 'a', 20)
325 r.register(Item('b'), 'b', 30)
326 self.assertEqual(r[0], 'b')
327 self.assertEqual(r[1], 'a')
328 with self.assertRaises(IndexError):
329 r[3]
330
331 def testRegistryGetItemByItem(self):
332 r = markdown.util.Registry()

Callers

nothing calls this directly

Calls 2

registerMethod · 0.95
ItemClass · 0.85

Tested by

no test coverage detected