(self)
| 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() |