def test_installing_nonexistent(self): """ Fail if the dependencies cannot be met """ info = { 'name': 'TestPipFail', 'module': 'dummy', 'description': None, 'requirements': ['IAmMakingThisPackageNameUpToFail'], 'version': 0 } with self.assertRaises(Error): plugins.install_deps(info)
def test_installing(self): """ Installing a plugin """ info = { 'name': 'TestPip', 'module': 'dummy', 'description': None, 'requirements': ['noop'], 'version': 0 } root = os.path.join(self.dir, 'plugins', 'dummy_plugin') module = plugins.load_plugin_from_info(info, root=root) plugins.install_deps(info) assert module.name == 'TestPip' assert module import noop dir(noop)