Ejemplo n.º 1
0
    def test_in_part(self):
        """get_python_command should support in-part python"""

        stage_dir = 'stage_dir'
        install_dir = 'install_dir'

        # Create installed binary
        self._create_python_binary(install_dir)

        python_command = _python_finder.get_python_command(
            'test', stage_dir=stage_dir, install_dir=install_dir)
        self.assertThat(
            python_command,
            Equals(os.path.join(install_dir, 'usr', 'bin', 'pythontest')))
Ejemplo n.º 2
0
    def test_in_part(self):
        """get_python_command should support in-part python"""

        stage_dir = 'stage_dir'
        install_dir = 'install_dir'

        # Create installed binary
        self._create_python_binary(install_dir)

        python_command = _python_finder.get_python_command(
            'test', stage_dir=stage_dir, install_dir=install_dir)
        self.assertThat(
            python_command, Equals(os.path.join(
                install_dir, 'usr', 'bin', 'pythontest')))
Ejemplo n.º 3
0
    def test_staged_and_in_part(self):
        """get_python_command should prefer staged python over in-part"""

        stage_dir = 'stage_dir'
        install_dir = 'install_dir'

        # Create both staged and installed binaries
        self._create_python_binary(stage_dir)
        self._create_python_binary(install_dir)

        python_command = _python_finder.get_python_command(
            'test', stage_dir=stage_dir, install_dir=install_dir)
        self.assertThat(
            python_command,
            Equals(os.path.join(stage_dir, 'usr', 'bin', 'pythontest')))
Ejemplo n.º 4
0
    def test_staged(self):
        """get_python_command should support staged python"""

        stage_dir = "stage_dir"
        install_dir = "install_dir"

        # Create staged binary
        self._create_python_binary(stage_dir)

        python_command = _python_finder.get_python_command(
            "test", stage_dir=stage_dir, install_dir=install_dir
        )
        self.assertThat(
            python_command, Equals(os.path.join(stage_dir, "usr", "bin", "pythontest"))
        )
Ejemplo n.º 5
0
    def test_staged_and_in_part(self):
        """get_python_command should prefer staged python over in-part"""

        stage_dir = 'stage_dir'
        install_dir = 'install_dir'

        # Create both staged and installed binaries
        self._create_python_binary(stage_dir)
        self._create_python_binary(install_dir)

        python_command = _python_finder.get_python_command(
            'test', stage_dir=stage_dir, install_dir=install_dir)
        self.assertThat(
            python_command, Equals(os.path.join(
                stage_dir, 'usr', 'bin', 'pythontest')))
Ejemplo n.º 6
0
    def test_staged_and_in_part(self):
        """get_python_command should prefer staged python over in-part"""

        stage_dir = "stage_dir"
        install_dir = "install_dir"

        # Create both staged and installed binaries
        self._create_python_binary(stage_dir)
        self._create_python_binary(install_dir)

        python_command = _python_finder.get_python_command(
            "test", stage_dir=stage_dir, install_dir=install_dir
        )
        self.assertThat(
            python_command, Equals(os.path.join(stage_dir, "usr", "bin", "pythontest"))
        )