MCPcopy
hub / github.com/Python-Markdown/markdown / testSortRegistry

Method testSortRegistry

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

Source from the content-addressed store, hash-verified

239 r.register(Item('a'))
240
241 def testSortRegistry(self):
242 r = markdown.util.Registry()
243 r.register(Item('a'), 'a', 20)
244 r.register(Item('b'), 'b', 21)
245 r.register(Item('c'), 'c', 20.5)
246 self.assertEqual(len(r), 3)
247 self.assertEqual(list(r), ['b', 'c', 'a'])
248
249 def testIsSorted(self):
250 r = markdown.util.Registry()

Callers

nothing calls this directly

Calls 2

registerMethod · 0.95
ItemClass · 0.85

Tested by

no test coverage detected