Пример #1
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 == {}
Пример #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 == {}
Пример #3
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')
Пример #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')