MCPcopy Index your code
hub / github.com/Python-Markdown/markdown / testRegistrySlice

Method testRegistrySlice

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

Source from the content-addressed store, hash-verified

329 del r['a']
330
331 def testRegistrySlice(self):
332 r = markdown.util.Registry()
333 r.register(Item('a'), 'a', 20)
334 r.register(Item('b'), 'b', 30)
335 r.register(Item('c'), 'c', 40)
336 slc = r[1:]
337 self.assertEqual(len(slc), 2)
338 self.assertIsInstance(slc, markdown.util.Registry)
339 self.assertEqual(list(slc), ['b', 'a'])
340
341 def testGetIndexForName(self):
342 r = markdown.util.Registry()

Callers

nothing calls this directly

Calls 2

registerMethod · 0.95
ItemClass · 0.85

Tested by

no test coverage detected