(self)
| 329 | r[3] |
| 330 | |
| 331 | def testRegistryGetItemByItem(self): |
| 332 | r = markdown.util.Registry() |
| 333 | r.register(Item('a'), 'a', 20) |
| 334 | r.register(Item('b'), 'b', 30) |
| 335 | self.assertEqual(r['a'], 'a') |
| 336 | self.assertEqual(r['b'], 'b') |
| 337 | with self.assertRaises(KeyError): |
| 338 | r['c'] |
| 339 | |
| 340 | def testRegistrySetItem(self): |
| 341 | r = markdown.util.Registry() |