Пример #1
0
def test_plugin_client_extra_path(qtbot, plugin_name):
    """Test adding of extra path.

    Extra path is used for adding spyder_path to plugin clients.
    """
    extra_path = '/some/dummy/path'

    plugin = PluginClient(plugin_name=plugin_name, extra_path=[extra_path])
    plugin.run()
    python_path = plugin.process.processEnvironment().value('PYTHONPATH')
    assert extra_path in python_path.split(osp.pathsep)
Пример #2
0
 def __init__(self, executable):
     super(PluginManager, self).__init__()
     plugins = OrderedDict()
     for name in PLUGINS:
         try:
             plugin = PluginClient(name, executable)
             plugin.run()
         except Exception as e:
             debug_print('Introspection Plugin Failed: %s' % name)
             debug_print(str(e))
             continue
         debug_print('Introspection Plugin Loaded: %s' % name)
         plugins[name] = plugin
         plugin.received.connect(self.handle_response)
     self.plugins = plugins
     self.timer = QTimer()
     self.desired = []
     self.ids = dict()
     self.info = None
     self.request = None
     self.pending = None
     self.pending_request = None
     self.waiting = False
Пример #3
0
 def __init__(self, executable):
     super(PluginManager, self).__init__()
     plugins = OrderedDict()
     for name in PLUGINS:
         try:
             plugin = PluginClient(name, executable)
             plugin.run()
         except Exception as e:
             debug_print('Introspection Plugin Failed: %s' % name)
             debug_print(str(e))
             continue
         debug_print('Introspection Plugin Loaded: %s' % name)
         plugins[name] = plugin
         plugin.received.connect(self.handle_response)
     self.plugins = plugins
     self.timer = QTimer()
     self.desired = []
     self.ids = dict()
     self.info = None
     self.request = None
     self.pending = None
     self.pending_request = None
     self.waiting = False
Пример #4
0
def test_plugin_client(qtbot, plugin_name):
    """Test creation of the diferent plugin clients."""
    plugin = PluginClient(plugin_name=plugin_name)

    assert plugin