def test_remove(manager: ModuleManager):
    plugin = manager.plugins['dummy'] = Plugin('a', 'path', [])
    manager.load = Mock()
    manager.remove('dummy')
    assert plugin.future.cancelled
    assert manager.plugins == {}
Exemple #2
0
def test_remove(manager: ModuleManager):
    plugin = manager.plugins['dummy'] = Plugin('a', 'path', [])
    manager.load = Mock()
    manager.remove('dummy')
    assert plugin.future.cancelled
    assert manager.plugins == {}
def test_reload(manager: ModuleManager):
    manager.plugins['dummy'] = Plugin('a', 'path', [])
    manager.load = Mock()
    manager.reload('dummy')
    assert manager.plugins['dummy'].future.cancelled
    manager.load.called_once_with('dummy', 'path')
Exemple #4
0
def test_reload(manager: ModuleManager):
    manager.plugins['dummy'] = Plugin('a', 'path', [])
    manager.load = Mock()
    manager.reload('dummy')
    assert manager.plugins['dummy'].future.cancelled
    manager.load.called_once_with('dummy', 'path')