def test_should_install_multiple_dependencies_locally(self): self.project.depends_on("spam") self.project.depends_on("eggs") self.project.depends_on("foo") self.project.set_property("install_dependencies_local_mapping", { "spam": "any-dir", "eggs": "any-other-dir" }) install_runtime_dependencies(self.logger, self.project) verify(pybuilder.plugins.python.install_dependencies_plugin ).execute_command( [PIP_EXECUTABLE, "install", "-t", "any-dir", 'spam'], any_value(), shell=False) verify( pybuilder.plugins.python.install_dependencies_plugin ).execute_command( [PIP_EXECUTABLE, "install", "-t", "any-other-dir", 'eggs'], any_value(), shell=False) verify(pybuilder.plugins.python.install_dependencies_plugin ).execute_command([PIP_EXECUTABLE, "install", 'foo'], any_value(), shell=False)
def test_should_install_multiple_dependencies(self, exec_command, get_package_version): self.project.depends_on("spam") self.project.depends_on("eggs") self.project.depends_on_requirements("requirements.txt") install_runtime_dependencies(self.logger, self.project) exec_command(PIP_EXEC_STANZA + ["install", 'spam'], ANY, shell=False) exec_command(PIP_EXEC_STANZA + ["install", 'eggs'], ANY, shell=False) exec_command(PIP_EXEC_STANZA + ["install", '-r', 'requirements.txt'], ANY, shell=False)
def test_should_install_multiple_dependencies(self): self.project.depends_on("spam") self.project.depends_on("eggs") install_runtime_dependencies(self.logger, self.project) verify(pybuilder.plugins.python.install_dependencies_plugin ).execute_command("pip install 'spam'", any_value(), shell=True) verify(pybuilder.plugins.python.install_dependencies_plugin ).execute_command("pip install 'eggs'", any_value(), shell=True)
def test_should_install_multiple_dependencies(self): self.project.depends_on("spam") self.project.depends_on("eggs") install_runtime_dependencies(self.logger, self.project) verify( pybuilder.plugins.python.install_dependencies_plugin).execute_command("pip install 'spam'", any_value(), shell=True) verify( pybuilder.plugins.python.install_dependencies_plugin).execute_command("pip install 'eggs'", any_value(), shell=True)
def test_should_install_multiple_dependencies(self): self.project.depends_on("spam") self.project.depends_on("eggs") self.project.depends_on_requirements("requirements.txt") install_runtime_dependencies(self.logger, self.project) verify(pybuilder.plugins.python.install_dependencies_plugin).execute_command( PIP_EXEC_STANZA + ["install", 'spam'], any_value(), shell=False) verify(pybuilder.plugins.python.install_dependencies_plugin).execute_command( PIP_EXEC_STANZA + ["install", 'eggs'], any_value(), shell=False) verify(pybuilder.plugins.python.install_dependencies_plugin).execute_command( PIP_EXEC_STANZA + ["install", '-r', 'requirements.txt'], any_value(), shell=False)
def test_should_install_multiple_dependencies_locally(self, exec_command, get_package_version): self.project.depends_on("spam") self.project.depends_on("eggs") self.project.depends_on("foo") self.project.set_property("install_dependencies_local_mapping", { "spam": "any-dir", "eggs": "any-other-dir" }) install_runtime_dependencies(self.logger, self.project) exec_command(PIP_EXEC_STANZA + ["install", "-t", "any-dir", 'spam'], ANY, shell=False) exec_command(PIP_EXEC_STANZA + ["install", "-t", "any-other-dir", 'eggs'], ANY, shell=False) exec_command(PIP_EXEC_STANZA + ["install", 'foo'], ANY, shell=False)
def test_should_install_multiple_dependencies_locally(self): self.project.depends_on("spam") self.project.depends_on("eggs") self.project.depends_on("foo") self.project.set_property("install_dependencies_local_mapping", { "spam": "any-dir", "eggs": "any-other-dir" }) install_runtime_dependencies(self.logger, self.project) verify(pybuilder.plugins.python.install_dependencies_plugin).execute_command( PIP_EXEC_STANZA + ["install", "-t", "any-dir", 'spam'], any_value(), shell=False) verify(pybuilder.plugins.python.install_dependencies_plugin).execute_command( PIP_EXEC_STANZA + ["install", "-t", "any-other-dir", 'eggs'], any_value(), shell=False) verify(pybuilder.plugins.python.install_dependencies_plugin).execute_command( PIP_EXEC_STANZA + ["install", 'foo'], any_value(), shell=False)
def test_should_install_multiple_dependencies_locally(self): self.project.depends_on("spam") self.project.depends_on("eggs") self.project.depends_on("foo") self.project.set_property("install_dependencies_local_mapping", {"spam": "any-dir", "eggs": "any-other-dir"}) install_runtime_dependencies(self.logger, self.project) verify(pybuilder.plugins.python.install_dependencies_plugin).execute_command( "pip install -t any-dir 'spam'", any_value(), shell=True ) verify(pybuilder.plugins.python.install_dependencies_plugin).execute_command( "pip install -t any-other-dir 'eggs'", any_value(), shell=True ) verify(pybuilder.plugins.python.install_dependencies_plugin).execute_command( "pip install 'foo'", any_value(), shell=True )
def test_should_install_multiple_dependencies(self, *_): self.project.depends_on("spam") self.project.depends_on("eggs") self.project.depends_on_requirements("requirements.txt") install_runtime_dependencies(self.logger, self.project, self.reactor) exec_cmd = self.pyb_env.execute_command call_stanza = self.pyb_env.executable + PIP_MODULE_STANZA + [ "install", "-c", ANY ] exec_cmd.assert_called_with(call_stanza + ["eggs", "spam", "-r", "requirements.txt"], outfile_name=ANY, error_file_name=ANY, env=ANY, cwd=None, shell=False, no_path_search=True)
def test_should_install_multiple_dependencies(self): self.project.depends_on("spam") self.project.depends_on("eggs") self.project.depends_on_requirements("requirements.txt") install_runtime_dependencies(self.logger, self.project) verify(pybuilder.plugins.python.install_dependencies_plugin ).execute_command([PIP_EXECUTABLE, "install", 'spam'], any_value(), shell=False) verify(pybuilder.plugins.python.install_dependencies_plugin ).execute_command([PIP_EXECUTABLE, "install", 'eggs'], any_value(), shell=False) verify(pybuilder.plugins.python.install_dependencies_plugin ).execute_command( [PIP_EXECUTABLE, "install", '-r', 'requirements.txt'], any_value(), shell=False)
def test_should_install_multiple_dependencies_locally(self): self.project.depends_on("spam") self.project.depends_on("eggs") self.project.depends_on("foo") self.project.set_property("install_dependencies_local_mapping", { "spam": "any-dir", "eggs": "any-other-dir" }) install_runtime_dependencies(self.logger, self.project) verify( pybuilder.plugins.python.install_dependencies_plugin).execute_command("pip install -t any-dir 'spam'", any_value(), shell=True) verify( pybuilder.plugins.python.install_dependencies_plugin).execute_command("pip install -t any-other-dir 'eggs'", any_value(), shell=True) verify( pybuilder.plugins.python.install_dependencies_plugin).execute_command("pip install 'foo'", any_value(), shell=True)
def test_should_install_multiple_dependencies_locally(self, *_): self.project.depends_on("spam") self.project.depends_on("eggs") self.project.depends_on("foo") self.project.set_property("install_dependencies_local_mapping", { "spam": "any-dir", "eggs": "any-other-dir" }) install_runtime_dependencies(self.logger, self.project, self.reactor) exec_cmd = self.pyb_env.execute_command call_stanza = self.pyb_env.executable + PIP_MODULE_STANZA + [ "install", "-c", ANY ] exec_cmd.assert_has_calls([ call(call_stanza + ["-t", "any-other-dir", "eggs"], outfile_name=ANY, error_file_name=ANY, env=ANY, cwd=None, shell=False, no_path_search=True), call(call_stanza + ["-t", "any-dir", "spam"], outfile_name=ANY, error_file_name=ANY, env=ANY, cwd=None, shell=False, no_path_search=True), call(call_stanza + ["foo"], outfile_name=ANY, error_file_name=ANY, env=ANY, cwd=None, shell=False, no_path_search=True) ], any_order=True)