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

Method testRegistryGetItemByItem

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

Source from the content-addressed store, hash-verified

305 r[3]
306
307 def testRegistryGetItemByItem(self):
308 r = markdown.util.Registry()
309 r.register(Item('a'), 'a', 20)
310 r.register(Item('b'), 'b', 30)
311 self.assertEqual(r['a'], 'a')
312 self.assertEqual(r['b'], 'b')
313 with self.assertRaises(KeyError):
314 r['c']
315
316 def testRegistrySetItem(self):
317 r = markdown.util.Registry()

Callers

nothing calls this directly

Calls 2

registerMethod · 0.95
ItemClass · 0.85

Tested by

no test coverage detected