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')