def METHOD_NAME(cli, project):
    cli.add_project(project.dir, as_lppz=project.is_lppz)
    code, stdout, stderr = cli.run('open-project',
                                   '--export-schematics=foo.bar',
                                   project.path)
    assert stderr == \
        "  ERROR: Failed to export image \"{path}\". Check file permissions " \
        "and make sure to use a supported image file extension.\n".format(
            path=cli.abspath('foo.bar'),
        )
    assert stdout == \
        "Open project '{project.path}'...\n" \
        "Export schematics to 'foo.bar'...\n" \
        "Finished with errors!\n".format(project=project)
    assert code == 1