def test_call(self, capfd, node_package_command, node_package_command_args, node_package_command_output_regex): command = Command(node_package_command) assert command.call(node_package_command_args) is 0 out, err = capfd.readouterr() assert node_package_command_output_regex.match(out.strip()) assert not err
def test_call_non_zero_returncode( self, capfd, node_package_command, ): command = Command(node_package_command) assert command.call(['--non-existent']) is not 0 out, err = capfd.readouterr() assert not out and err