def test_should_install_multiple_dependencies(self):
        self.project.build_depends_on("spam")
        self.project.build_depends_on("eggs")

        install_build_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)
예제 #2
0
        def test_should_install_multiple_dependencies(self, exec_command, get_package_version):
            self.project.build_depends_on("spam")
            self.project.build_depends_on("eggs")
            self.project.build_depends_on_requirements("requirements-dev.txt")

            install_build_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-dev.txt'], ANY, shell=False)
    def test_should_install_multiple_dependencies(self):
        self.project.build_depends_on("spam")
        self.project.build_depends_on("eggs")

        install_build_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.build_depends_on("spam")
            self.project.build_depends_on("eggs")
            self.project.build_depends_on_requirements("requirements-dev.txt")

            install_build_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-dev.txt'], any_value(), shell=False)
        def test_should_install_multiple_dependencies(self):
            self.project.build_depends_on("spam")
            self.project.build_depends_on("eggs")
            self.project.build_depends_on_requirements("requirements-dev.txt")

            install_build_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-dev.txt'],
                                     any_value(),
                                     shell=False)
예제 #6
0
    def test_should_install_multiple_dependencies(self, *_):
        self.project.build_depends_on("spam")
        self.project.build_depends_on("eggs")
        self.project.build_depends_on_requirements("requirements-dev.txt")

        install_build_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-dev.txt"],
            outfile_name=ANY,
            error_file_name=ANY,
            env=ANY,
            cwd=None,
            shell=False,
            no_path_search=True)