def test_plugin_discovery_nested(self): class BarPlugin(self.FooPlugin): NAME = 'bar' plugins = Plugin.plugins().keys() self.assertIn('foo', plugins) self.assertIn('bar', plugins)
def test_plugin_discovery(): class FooPlugin(Plugin): NAME = 'foo' class BarPlugin(FooPlugin): NAME = 'bar' plugin_names = Plugin.plugins().keys() assert sorted(plugin_names) == ['bar', 'foo']