(self)
| 305 | r[3] |
| 306 | |
| 307 | def testRegistryGetItemByItem(self): |
| 308 | r = markdown.util.Registry() |
| 309 | r.register(Item('a'), 'a', 20) |
| 310 | r.register(Item('b'), 'b', 30) |
| 311 | self.assertEqual(r['a'], 'a') |
| 312 | self.assertEqual(r['b'], 'b') |
| 313 | with self.assertRaises(KeyError): |
| 314 | r['c'] |
| 315 | |
| 316 | def testRegistrySetItem(self): |
| 317 | r = markdown.util.Registry() |