def test_Popen_non_zero_returncode(self, node_package_command): command = Command(node_package_command) process = command.Popen('--non-existent', stdout=PIPE, stderr=PIPE, universal_newlines=True) out, err = process.communicate() assert process.returncode is not 0 assert not out and err
def test_Popen(self, node_package_command, node_package_command_args, node_package_command_output_regex): command = Command(node_package_command) process = command.Popen(node_package_command_args, stdout=PIPE, stderr=PIPE, universal_newlines=True) out, err = process.communicate() assert node_package_command_output_regex.match(out.strip()) assert not err