297
306
self.assertEqual(['function', 'klass', 'module', 'obj'],
298
307
sorted(a_registry.keys()))
299
308
# The plugin should not be loaded until we grab the first object
302
311
# By default the plugin won't be in the search path
303
312
self.assertRaises(ImportError, a_registry.get, 'obj')
306
315
sys.path.append(plugin_path)
308
317
obj = a_registry.get('obj')
309
318
self.assertEqual('foo', obj)
312
321
# Now grab another object
313
322
func = a_registry.get('function')