def test_should_accept_array_of_simple_commands(self, proc_runner, *args): proc_runner.return_value = 0 commands = ["a", "b", "c"] execute_distutils(self.project, MagicMock(Logger), commands) self.assertEquals(popen_distutils_args(self, 3, proc_runner), [[cmd] for cmd in commands])
def test_should_accept_array_of_compound_commands(self, proc_runner, *args): proc_runner.return_value = 0 commands = ["a", "b", "c"] execute_distutils(self.project, MagicMock(Logger), [commands]) self.assertEquals(popen_distutils_args(self, 1, proc_runner), [commands])
def test_should_accept_array_of_compound_commands(self, popen, *args): popen().wait.return_value = 0 commands = ["a", "b", "c"] execute_distutils(self.project, MagicMock(Logger), [commands]) self.assertEquals(popen_distutils_args(self, 1, popen), commands)
def test_should_accept_array_of_simple_commands(self, *_): commands = ["a", "b", "c"] execute_distutils(self.project, MagicMock(Logger), self.pyb_env, commands) self.pyb_env.run_process_and_wait.assert_has_calls( [call(self.pyb_env.executable + [ANY, cmd], ANY, ANY) for cmd in commands])
def test_should_accept_array_of_compound_commands(self, *_): commands = ["a", "b", "c"] execute_distutils(self.project, MagicMock(Logger), self.pyb_env, [commands]) self.pyb_env.run_process_and_wait.assert_has_calls( [call(self.pyb_env.executable + [ANY] + commands, ANY, ANY)])
def test_should_accept_array_of_simple_commands(self, popen, *args): popen().wait.return_value = 0 commands = ["a", "b", "c"] execute_distutils(self.project, MagicMock(Logger), commands) self.assertEquals(popen_distutils_args(self, 3, popen), commands)