Beispiel #1
0
    def test_describe_plugins(self):
        class DummyModule(object):
            __doc__ = 'Hi there'
        class DummyPlugin(object):
            __version__ = '0.1.0'
            module = DummyModule()
        def dummy_plugins():
            return { 'good': DummyPlugin() }
        self.overrideAttr(plugin, 'plugin_warnings',
            {'bad': ['Failed to load (just testing)']})
        self.overrideAttr(plugin, 'plugins', dummy_plugins)
        self.assertEquals("""\
bad (failed to load)
  ** Failed to load (just testing)

good 0.1.0
  Hi there

""", ''.join(plugin.describe_plugins()))
    def test_describe_plugins(self):
        class DummyModule(object):
            __doc__ = 'Hi there'

        class DummyPlugin(object):
            __version__ = '0.1.0'
            module = DummyModule()

        def dummy_plugins():
            return {'good': DummyPlugin()}

        self.overrideAttr(plugin, 'plugin_warnings',
                          {'bad': ['Failed to load (just testing)']})
        self.overrideAttr(plugin, 'plugins', dummy_plugins)
        self.assertEqual(
            """\
bad (failed to load)
  ** Failed to load (just testing)

good 0.1.0
  Hi there

""", ''.join(plugin.describe_plugins()))
Beispiel #3
0
def _format_plugin_list():
    return ''.join(plugin.describe_plugins(show_paths=True))
Beispiel #4
0
def _format_plugin_list():
    return ''.join(plugin.describe_plugins(show_paths=True))