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

Method testRegistrySlice

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

Source from the content-addressed store, hash-verified

353 del r['a']
354
355 def testRegistrySlice(self):
356 r = markdown.util.Registry()
357 r.register(Item('a'), 'a', 20)
358 r.register(Item('b'), 'b', 30)
359 r.register(Item('c'), 'c', 40)
360 slc = r[1:]
361 self.assertEqual(len(slc), 2)
362 self.assertIsInstance(slc, markdown.util.Registry)
363 self.assertEqual(list(slc), ['b', 'a'])
364
365 def testGetIndexForName(self):
366 r = markdown.util.Registry()

Callers

nothing calls this directly

Calls 2

registerMethod · 0.95
ItemClass · 0.85

Tested by

no test coverage detected