Ejemplo n.º 1
0
    def test_binary_distribution_with_command_options(self, proc_runner, *args):
        proc_runner.return_value = 0
        self.project.set_property("distutils_command_options", {"sdist": ['--formats', 'bztar']})

        build_binary_distribution(self.project, MagicMock(Logger))
        self.assertEquals(popen_distutils_args(self, 2, proc_runner),
                          [["clean", "--all", "sdist", "--formats", "bztar"], ["clean", "--all", "bdist_dumb"]])
Ejemplo n.º 2
0
    def test_binary_distribution(self, proc_runner, *args):
        proc_runner.return_value = 0

        build_binary_distribution(self.project, MagicMock(Logger))
        self.assertEqual(
            popen_distutils_args(self, 2, proc_runner),
            [["clean", "--all", "sdist"], ["clean", "--all", "bdist_dumb"]])
    def test_binary_distribution_with_command_options(self, proc_runner, *args):
        proc_runner.return_value = 0
        self.project.set_property("distutils_command_options", {"sdist": ['--formats', 'bztar']})

        build_binary_distribution(self.project, MagicMock(Logger))
        self.assertEquals(popen_distutils_args(self, 2, proc_runner),
                          [["clean", "--all", "sdist", "--formats", "bztar"], ["clean", "--all", "bdist_dumb"]])
Ejemplo n.º 4
0
    def test_binary_distribution_with_command_options(self, *_):
        self.project.set_property("distutils_command_options", {"sdist": ['--formats', 'bztar']})

        build_binary_distribution(self.project, MagicMock(Logger), self.reactor)

        self.pyb_env.run_process_and_wait.assert_has_calls(
            [call(self.pyb_env.executable + [ANY, "clean", "--all", "sdist", "--formats", "bztar"], ANY, ANY),
             call(self.pyb_env.executable + [ANY, "clean", "--all", "bdist_dumb"], ANY, ANY)])
Ejemplo n.º 5
0
    def test_binary_distribution(self, walk, *_):
        walk.return_value = [("root", (), ("file1", "file2"))]

        build_binary_distribution(self.project, MagicMock(Logger), self.reactor)

        self.pyb_env.run_process_and_wait.assert_has_calls(
            [call(self.pyb_env.executable + [ANY, "clean", "--all", "sdist"], ANY, ANY),
             call(self.pyb_env.executable + [ANY, "clean", "--all", "bdist_dumb"], ANY, ANY),
             call(self.pyb_env.executable + ["-m", "twine", "check",
                                             self.project.expand_path("$dir_dist", "dist", "file1"),
                                             self.project.expand_path("$dir_dist", "dist", "file2")], ANY, ANY)])
Ejemplo n.º 6
0
    def test_binary_distribution_with_command_options(self, walk, *_):
        self.project.set_property("distutils_command_options", {"sdist": ['--formats', 'bztar']})

        walk.return_value = [("root", (), ("file1", "file2"))]

        build_binary_distribution(self.project, MagicMock(Logger), self.reactor)

        self.pyb_env.run_process_and_wait.assert_has_calls(
            [call(self.pyb_env.executable + [ANY, "clean", "--all", "sdist", "--formats", "bztar"], ANY, ANY),
             call(self.pyb_env.executable + [ANY, "clean", "--all", "bdist_dumb"], ANY, ANY),
             call(self.pyb_env.executable + ["-m", "twine", "check",
                                             self.project.expand_path("$dir_dist", "dist", "file1"),
                                             self.project.expand_path("$dir_dist", "dist", "file2")], ANY, ANY)])
Ejemplo n.º 7
0
    def test_binary_distribution(self, proc_runner, *args):
        proc_runner.return_value = 0

        build_binary_distribution(self.project, MagicMock(Logger))
        self.assertEquals(popen_distutils_args(self, 2, proc_runner),
                          [["clean", "--all", "sdist"], ["clean", "--all", "bdist_dumb"]])
Ejemplo n.º 8
0
    def test_binary_distribution(self, popen, *args):
        popen().wait.return_value = 0

        build_binary_distribution(self.project, MagicMock(Logger))
        self.assertEquals(popen_distutils_args(self, 2, popen),
                          ["sdist", "bdist_dumb"])
Ejemplo n.º 9
0
    def test_binary_distribution(self, *_):
        build_binary_distribution(self.project, MagicMock(Logger), self.reactor)

        self.pyb_env.run_process_and_wait.assert_has_calls(
            [call(self.pyb_env.executable + [ANY, "clean", "--all", "sdist"], ANY, ANY),
             call(self.pyb_env.executable + [ANY, "clean", "--all", "bdist_dumb"], ANY, ANY)])
Ejemplo n.º 10
0
    def test_binary_distribution(self, popen, *args):
        popen().wait.return_value = 0

        build_binary_distribution(self.project, MagicMock(Logger))
        self.assertEquals(popen_distutils_args(self, 2, popen), ["sdist", "bdist_dumb"])