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

Method testSortRegistry

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

Source from the content-addressed store, hash-verified

263 r.register(Item('a'))
264
265 def testSortRegistry(self):
266 r = markdown.util.Registry()
267 r.register(Item('a'), 'a', 20)
268 r.register(Item('b'), 'b', 21)
269 r.register(Item('c'), 'c', 20.5)
270 self.assertEqual(len(r), 3)
271 self.assertEqual(list(r), ['b', 'c', 'a'])
272
273 def testIsSorted(self):
274 r = markdown.util.Registry()

Callers

nothing calls this directly

Calls 2

registerMethod · 0.95
ItemClass · 0.85

Tested by

no test coverage detected