Package: src:ocrmypdf
Version: 5.5-2
Severity: serious
Tags: sid buster

The recent changelog reads:

  * Disable test suite at package build time.
    It now takes a prohibitively long time to run, so we are relying on
    autopkgtest instead.

Sorry, but this is one of the most lame excuses I have ever seen. Trying to run
it on my laptop in unstable needs 30 seconds.  However re-enabling it and
running it reveals

  =========== 122 failed, 24 passed, 4 skipped in 33.92 seconds ============

these results are after adding tesseract-ocr qpdf unpaper as build dependencies.

doubting that the primary reason for this change was build time ...

dpkg-buildpackage: info: source package ocrmypdf
dpkg-buildpackage: info: source version 5.5-2
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Sean Whitton 
<spwhit...@spwhitton.name>
 dpkg-source --before-build ocrmypdf-5.5
dpkg-buildpackage: info: host architecture amd64
dpkg-source: info: using options from ocrmypdf-5.5/debian/source/options:
--single-debian-patch --auto-commit --extend-diff-ignore=\.git_archival\.txt
 fakeroot debian/rules clean
dh clean --with python3,sphinxdoc --buildsystem=pybuild
   dh_auto_clean -O--buildsystem=pybuild
I: pybuild base:184: python3.6 setup.py clean
Skipping external program tests because of --force
running clean
removing '/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build' (and
everything under it)
'build/bdist.linux-amd64' does not exist -- can't clean it
'build/scripts-3.6' does not exist -- can't clean it
   dh_clean -O--buildsystem=pybuild
 debian/rules build
dh build --with python3,sphinxdoc --buildsystem=pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:184: python3.6 setup.py config
Skipping external program tests because of --force
running config
   debian/rules override_dh_auto_build
make[1]: Entering directory '/home/packages/tmp/ocrmypdf-5.5'
mkdir -p debian/.debhelper
cp -R ocrmypdf debian/.debhelper
sed -i debian/.debhelper/ocrmypdf/__init__.py -e \
        "s|^__version__ =.*|__version__ = \"5.5\"|"
PYTHONPATH=debian/.debhelper sphinx-build docs html
Running Sphinx v1.6.6
making output directory...
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 10 source files that are out of date
updating environment: 10 added, 0 changed, 0 removed
reading sources... [ 10%] advanced
reading sources... [ 20%] batch
reading sources... [ 30%] cookbook
reading sources... [ 40%] errors
reading sources... [ 50%] index
reading sources... [ 60%] installation
reading sources... [ 70%] introduction
reading sources... [ 80%] languages
reading sources... [ 90%] release_notes
reading sources... [100%] security

/home/packages/tmp/ocrmypdf-5.5/docs/installation.rst:2: WARNING: Duplicate
explicit target name: "docker".
/home/packages/tmp/ocrmypdf-5.5/docs/introduction.rst:108: WARNING: Unknown
target name: "using ocrmypdf online".
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/packages/tmp/ocrmypdf-5.5/docs/installation.rst:
WARNING: document isn't included in any toctree
done
preparing documents... done
writing output... [ 10%] advanced
writing output... [ 20%] batch
writing output... [ 30%] cookbook
writing output... [ 40%] errors
writing output... [ 50%] index
writing output... [ 60%] installation
writing output... [ 70%] introduction
writing output... [ 80%] languages
writing output... [ 90%] release_notes
writing output... [100%] security

generating indices... genindex
writing additional pages... search
copying images... [100%] bitmap_vs_svg.svg

copying static files... WARNING: html_static_path entry
'/home/packages/tmp/ocrmypdf-5.5/docs/_static' does not exist
done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 4 warnings.
dh_auto_build -O--buildsystem=pybuild
I: pybuild base:184: /usr/bin/python3 setup.py build
Skipping external program tests because of --force
running build
running build_py
creating /home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
copying ocrmypdf/_unicodefun.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
copying ocrmypdf/__main__.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
copying ocrmypdf/pdfa.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
copying ocrmypdf/leptonica.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
copying ocrmypdf/__init__.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
copying ocrmypdf/hocrtransform.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
copying ocrmypdf/helpers.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
copying ocrmypdf/pageinfo.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
copying ocrmypdf/pipeline.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
copying ocrmypdf/exceptions.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
copying ocrmypdf/pdfinfo.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf
creating 
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/lib
copying ocrmypdf/lib/__init__.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/lib
copying ocrmypdf/lib/compile_leptonica.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/lib
copying ocrmypdf/lib/_leptonica.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/lib
creating 
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/exec
copying ocrmypdf/exec/tesseract.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/exec
copying ocrmypdf/exec/qpdf.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/exec
copying ocrmypdf/exec/__init__.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/exec
copying ocrmypdf/exec/unpaper.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/exec
copying ocrmypdf/exec/ghostscript.py ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/exec
creating 
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/data
copying ocrmypdf/data/sRGB.icc ->
/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/data
generating cffi module
'/home/packages/tmp/ocrmypdf-5.5/.pybuild/pythonX.Y_3.6/build/ocrmypdf/lib/_leptonica.py'
already up-to-date
make[1]: Leaving directory '/home/packages/tmp/ocrmypdf-5.5'
   debian/rules override_dh_auto_test
make[1]: Entering directory '/home/packages/tmp/ocrmypdf-5.5'
python3 setup.py test
Checking for tesseract >= 3.04...
Found tesseract 4.00.00
Checking for gs >= 9.15...
Found gs 9.22
Checking for unpaper >= 6.1...
Found unpaper 6.1
Checking for qpdf >= 5.1.1...
Found qpdf 7.1.0
running pytest
Searching for pytest-timeout
Best match: pytest-timeout 1.2.1
Processing pytest_timeout-1.2.1-py3.6.egg

Using /home/packages/tmp/ocrmypdf-5.5/.eggs/pytest_timeout-1.2.1-py3.6.egg
Searching for pytest-cov
Best match: pytest-cov 2.5.1
Processing pytest_cov-2.5.1-py3.6.egg

Using /home/packages/tmp/ocrmypdf-5.5/.eggs/pytest_cov-2.5.1-py3.6.egg
Searching for pytest-xdist
Best match: pytest-xdist 1.22.0
Processing pytest_xdist-1.22.0-py3.6.egg

Using /home/packages/tmp/ocrmypdf-5.5/.eggs/pytest_xdist-1.22.0-py3.6.egg
Searching for pytest-helpers-namespace
Best match: pytest-helpers-namespace 2017.11.11
Processing pytest_helpers_namespace-2017.11.11-py3.6.egg

Using
/home/packages/tmp/ocrmypdf-5.5/.eggs/pytest_helpers_namespace-2017.11.11-py3.6.egg
Searching for coverage>=3.7.1
Best match: coverage 4.4.2
Processing coverage-4.4.2-py3.6-linux-x86_64.egg

Using 
/home/packages/tmp/ocrmypdf-5.5/.eggs/coverage-4.4.2-py3.6-linux-x86_64.egg
Searching for pytest-forked
Best match: pytest-forked 0.2
Processing pytest_forked-0.2-py3.6.egg

Using /home/packages/tmp/ocrmypdf-5.5/.eggs/pytest_forked-0.2-py3.6.egg
Searching for execnet>=1.1
Best match: execnet 1.5.0
Processing execnet-1.5.0-py3.6.egg

Using /home/packages/tmp/ocrmypdf-5.5/.eggs/execnet-1.5.0-py3.6.egg
Searching for apipkg>=1.4
Best match: apipkg 1.4
Processing apipkg-1.4-py3.6.egg

Using /home/packages/tmp/ocrmypdf-5.5/.eggs/apipkg-1.4-py3.6.egg
running egg_info
creating ocrmypdf.egg-info
writing ocrmypdf.egg-info/PKG-INFO
writing dependency_links to ocrmypdf.egg-info/dependency_links.txt
writing entry points to ocrmypdf.egg-info/entry_points.txt
writing requirements to ocrmypdf.egg-info/requires.txt
writing top-level names to ocrmypdf.egg-info/top_level.txt
writing manifest file 'ocrmypdf.egg-info/SOURCES.txt'
reading manifest file 'ocrmypdf.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'pytest.ini'
warning: no previously-included files matching '*' found under directory
'tests/output'
warning: no previously-included files matching '*' found under directory
'tests/output_pageinfo'
warning: no previously-included files matching '*' found under directory
'tests/resources/private'
warning: no previously-included files matching '*' found under directory
'tests/cache'
warning: no files found matching 'pipeline.svg'
warning: no previously-included files matching '*' found under directory 
'.github'
warning: no previously-included files matching '*' found under directory
'docs/_build'
warning: no previously-included files found matching 'tasks.py'
warning: no previously-included files found matching 'debug-runner.py'
warning: no previously-included files matching '*' found under directory 
'.travis'
warning: no previously-included files found matching '.travis*'
writing manifest file 'ocrmypdf.egg-info/SOURCES.txt'
running build_ext
generating cffi module 'ocrmypdf/lib/_leptonica.py'
already up-to-date
============================= test session starts ==============================
platform linux -- Python 3.6.4, pytest-3.2.1, py-1.4.34, pluggy-0.4.0
rootdir: /home/packages/tmp/ocrmypdf-5.5, inifile: setup.cfg
plugins: forked-0.2, helpers-namespace-2017.11.11, xdist-1.22.0, cov-2.5.1,
timeout-1.2.1
gw0 I / gw1 I / gw2 I / gw3 I
gw0 [150] / gw1 [150] / gw2 [150] / gw3 [150]

scheduling tests via LoadScheduling
.FFFFFFFFFFFFFFFFFFFFFFFFFFFFF.FF.FFFF.F.FFFFFFF..FF.FFFFFFFFFFFFFF.FFFFFFFFFFFF.FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.FF......FF...sss..sF..FFFFFFFF
=================================== FAILURES ===================================
_________________________________ test_deskew __________________________________
[gw2] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_noop = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir = PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw2/test_deskew0')

    def test_deskew(spoof_tesseract_noop, resources, outdir):
        # Run with deskew
        deskewed_pdf = check_ocrmypdf(
            resources / 'skew.pdf', outdir / 'skew.pdf', '-d',
>           env=spoof_tesseract_noop)

tests/test_main.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file = 
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/skew.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw2/test_deskew0/skew.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-d',), p = <subprocess.Popen object at 0x7f5b04b958d0>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7f5b04b958d0>.returncode

tests/conftest.py:116: AssertionError
____________________________ test_remove_background ____________________________
[gw0] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_noop = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir = 
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw0/test_remove_background0')

    def test_remove_background(spoof_tesseract_noop, resources, outdir):
        from PIL import Image

        # Ensure the input image does not contain pure white/black
        im = Image.open(resources / 'congress.jpg')
        assert im.getextrema() != ((0, 255), (0, 255), (0, 255))

        output_pdf = check_ocrmypdf(
            resources / 'congress.jpg',
            outdir / 'test_remove_bg.pdf',
            '--remove-background',
            '--image-dpi', '150',
>           env=spoof_tesseract_noop)

tests/test_main.py:120:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file =
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/congress.jpg')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw0/test_remove_background0/test_remove_bg.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('--remove-background', '--image-dpi', '150')
p = <subprocess.Popen object at 0x7efdfaa46860>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7efdfaa46860>.returncode

tests/conftest.py:116: AssertionError
__________________________________ test_clean __________________________________
[gw3] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_noop = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outpdf = '/tmp/pytest-of-doko/pytest-1/popen-gw3/test_clean0/out.pdf'

    def test_clean(spoof_tesseract_noop, resources, outpdf):
        check_ocrmypdf(resources / 'skew.pdf', outpdf, '-c',
>                      env=spoof_tesseract_noop)

tests/test_main.py:105:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file = 
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/skew.pdf')
output_file = '/tmp/pytest-of-doko/pytest-1/popen-gw3/test_clean0/out.pdf'
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-c',), p = <subprocess.Popen object at 0x7fd3e0b48f28>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7fd3e0b48f28>.returncode

tests/conftest.py:116: AssertionError
__________________________________ test_quick __________________________________
[gw1] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outpdf = '/tmp/pytest-of-doko/pytest-1/popen-gw1/test_quick0/out.pdf'

    def test_quick(spoof_tesseract_cache, resources, outpdf):
>       check_ocrmypdf(resources / 'ccitt.pdf', outpdf, 
> env=spoof_tesseract_cache)

tests/test_main.py:71:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file = 
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/ccitt.pdf')
output_file = '/tmp/pytest-of-doko/pytest-1/popen-gw1/test_quick0/out.pdf'
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = (), p = <subprocess.Popen object at 0x7f3590635400>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E            INFO - Tesseract v4.x.alpha found.
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7f3590635400>.returncode

tests/conftest.py:116: AssertionError
_____________________ test_exotic_image[pdf-auto-cmyk.pdf] _____________________
[gw2] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'cmyk.pdf', renderer = 'auto', output_type = 'pdf'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw2/test_exotic_image_pdf_auto_cmy0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file = 
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/cmyk.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw2/test_exotic_image_pdf_auto_cmy0/test_cmyk.pdf_auto.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdf', '--sidecar', ...)
p = <subprocess.Popen object at 0x7f5b033b1ba8>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/cmyk.pdf,
/tmp/com.github.ocrmypdf.osrr_tia/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7f5b033b1ba8>.returncode

tests/conftest.py:116: AssertionError
____________________ test_exotic_image[pdf-auto-jbig2.pdf] _____________________
[gw0] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'jbig2.pdf', renderer = 'auto', output_type = 'pdf'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw0/test_exotic_image_pdf_auto_jbi0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file = 
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/jbig2.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw0/test_exotic_image_pdf_auto_jbi0/test_jbig2.pdf_auto.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdf', '--sidecar', ...)
p = <subprocess.Popen object at 0x7efdf62eb048>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/jbig2.pdf,
/tmp/com.github.ocrmypdf.8_ekrii7/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7efdf62eb048>.returncode

tests/conftest.py:116: AssertionError
____________________ test_exotic_image[pdf-auto-ccitt.pdf] _____________________
[gw3] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'ccitt.pdf', renderer = 'auto', output_type = 'pdf'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw3/test_exotic_image_pdf_auto_cci0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file = 
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/ccitt.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw3/test_exotic_image_pdf_auto_cci0/test_ccitt.pdf_auto.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdf', '--sidecar', ...)
p = <subprocess.Popen object at 0x7fd3e0afafd0>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/ccitt.pdf,
/tmp/com.github.ocrmypdf.6tbpj10t/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7fd3e0afafd0>.returncode

tests/conftest.py:116: AssertionError
___________________ test_exotic_image[pdf-auto-palette.pdf] ____________________
[gw1] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'palette.pdf', renderer = 'auto', output_type = 'pdf'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw1/test_exotic_image_pdf_auto_pal0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file =
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/palette.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw1/test_exotic_image_pdf_auto_pal0/test_palette.pdf_auto.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdf', '--sidecar', ...)
p = <subprocess.Popen object at 0x7f35905e18d0>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/palette.pdf,
/tmp/com.github.ocrmypdf.filynb2d/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7f35905e18d0>.returncode

tests/conftest.py:116: AssertionError
_________________ test_exotic_image[pdf-tesseract-palette.pdf] _________________
[gw2] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'palette.pdf', renderer = 'tesseract', output_type = 'pdf'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw2/test_exotic_image_pdf_tesserac0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file =
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/palette.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw2/test_exotic_image_pdf_tesserac0/test_palette.pdf_tesseract.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdf', '--sidecar', ...)
p = <subprocess.Popen object at 0x7f5b04ba4470>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E         WARNING - The argument --pdf-renderer=tesseract provides support for
versions of tesseract older than your version. For best results omit this
argument and let OCRmyPDF choose the best available renderer.
E            INFO - Tesseract PDF renderer cannot render --clean pages without
also performing --clean-final, so --clean-final is assumed.
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/palette.pdf,
/tmp/com.github.ocrmypdf.wdv2n4ld/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7f5b04ba4470>.returncode

tests/conftest.py:116: AssertionError
__________________ test_exotic_image[pdf-tesseract-ccitt.pdf] __________________
[gw0] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'ccitt.pdf', renderer = 'tesseract', output_type = 'pdf'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw0/test_exotic_image_pdf_tesserac0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file = 
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/ccitt.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw0/test_exotic_image_pdf_tesserac0/test_ccitt.pdf_tesseract.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdf', '--sidecar', ...)
p = <subprocess.Popen object at 0x7efdf62eb588>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E         WARNING - The argument --pdf-renderer=tesseract provides support for
versions of tesseract older than your version. For best results omit this
argument and let OCRmyPDF choose the best available renderer.
E            INFO - Tesseract PDF renderer cannot render --clean pages without
also performing --clean-final, so --clean-final is assumed.
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/ccitt.pdf,
/tmp/com.github.ocrmypdf._knagie9/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7efdf62eb588>.returncode

tests/conftest.py:116: AssertionError
__________________ test_exotic_image[pdf-tesseract-cmyk.pdf] ___________________
[gw3] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'cmyk.pdf', renderer = 'tesseract', output_type = 'pdf'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw3/test_exotic_image_pdf_tesserac0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file = 
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/cmyk.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw3/test_exotic_image_pdf_tesserac0/test_cmyk.pdf_tesseract.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdf', '--sidecar', ...)
p = <subprocess.Popen object at 0x7fd3e0b7dcf8>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E         WARNING - The argument --pdf-renderer=tesseract provides support for
versions of tesseract older than your version. For best results omit this
argument and let OCRmyPDF choose the best available renderer.
E            INFO - Tesseract PDF renderer cannot render --clean pages without
also performing --clean-final, so --clean-final is assumed.
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/cmyk.pdf,
/tmp/com.github.ocrmypdf.5_efsgdv/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7fd3e0b7dcf8>.returncode

tests/conftest.py:116: AssertionError
_________________ test_exotic_image[pdf-auto-lichtenstein.pdf] _________________
[gw1] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'lichtenstein.pdf', renderer = 'auto', output_type = 'pdf'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw1/test_exotic_image_pdf_auto_lic0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file =
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/lichtenstein.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw1/test_exotic_image_pdf_auto_lic0/test_lichtenstein.pdf_auto.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdf', '--sidecar', ...)
p = <subprocess.Popen object at 0x7f35905b7828>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/lichtenstein.pdf,
/tmp/com.github.ocrmypdf.0v_p9rvh/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7f35905b7828>.returncode

tests/conftest.py:116: AssertionError
______________ test_exotic_image[pdf-tesseract-lichtenstein.pdf] _______________
[gw2] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'lichtenstein.pdf', renderer = 'tesseract', output_type = 'pdf'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw2/test_exotic_image_pdf_tesserac1')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file =
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/lichtenstein.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw2/test_exotic_image_pdf_tesserac1/test_lichtenstein.pdf_tesseract.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdf', '--sidecar', ...)
p = <subprocess.Popen object at 0x7f5b04b95358>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E         WARNING - The argument --pdf-renderer=tesseract provides support for
versions of tesseract older than your version. For best results omit this
argument and let OCRmyPDF choose the best available renderer.
E            INFO - Tesseract PDF renderer cannot render --clean pages without
also performing --clean-final, so --clean-final is assumed.
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/lichtenstein.pdf,
/tmp/com.github.ocrmypdf.h9g0fyil/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7f5b04b95358>.returncode

tests/conftest.py:116: AssertionError
____________________ test_exotic_image[pdfa-auto-cmyk.pdf] _____________________
[gw0] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'cmyk.pdf', renderer = 'auto', output_type = 'pdfa'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw0/test_exotic_image_pdfa_auto_cm0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file = 
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/cmyk.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw0/test_exotic_image_pdfa_auto_cm0/test_cmyk.pdf_auto.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdfa', '--sidecar', ...)
p = <subprocess.Popen object at 0x7efdf62a37f0>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/cmyk.pdf,
/tmp/com.github.ocrmypdf.z6ikej9a/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7efdf62a37f0>.returncode

tests/conftest.py:116: AssertionError
___________________ test_exotic_image[pdfa-auto-palette.pdf] ___________________
[gw3] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'palette.pdf', renderer = 'auto', output_type = 'pdfa'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw3/test_exotic_image_pdfa_auto_pa0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file =
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/palette.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw3/test_exotic_image_pdfa_auto_pa0/test_palette.pdf_auto.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdfa', '--sidecar', ...)
p = <subprocess.Popen object at 0x7fd3e0ad7c88>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/palette.pdf,
/tmp/com.github.ocrmypdf.q07iwqob/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7fd3e0ad7c88>.returncode

tests/conftest.py:116: AssertionError
__________________ test_exotic_image[pdf-tesseract-jbig2.pdf] __________________
[gw1] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'jbig2.pdf', renderer = 'tesseract', output_type = 'pdf'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw1/test_exotic_image_pdf_tesserac0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file = 
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/jbig2.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw1/test_exotic_image_pdf_tesserac0/test_jbig2.pdf_tesseract.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdf', '--sidecar', ...)
p = <subprocess.Popen object at 0x7f35905dc390>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E         WARNING - The argument --pdf-renderer=tesseract provides support for
versions of tesseract older than your version. For best results omit this
argument and let OCRmyPDF choose the best available renderer.
E            INFO - Tesseract PDF renderer cannot render --clean pages without
also performing --clean-final, so --clean-final is assumed.
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/jbig2.pdf,
/tmp/com.github.ocrmypdf.dqmtomp8/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7f35905dc390>.returncode

tests/conftest.py:116: AssertionError
________________ test_exotic_image[pdfa-tesseract-palette.pdf] _________________
[gw0] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'palette.pdf', renderer = 'tesseract', output_type = 'pdfa'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw0/test_exotic_image_pdfa_tessera0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file =
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/palette.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw0/test_exotic_image_pdfa_tessera0/test_palette.pdf_tesseract.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdfa', '--sidecar', ...)
p = <subprocess.Popen object at 0x7efdf61e52e8>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E         WARNING - The argument --pdf-renderer=tesseract provides support for
versions of tesseract older than your version. For best results omit this
argument and let OCRmyPDF choose the best available renderer.
E            INFO - Tesseract PDF renderer cannot render --clean pages without
also performing --clean-final, so --clean-final is assumed.
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/palette.pdf,
/tmp/com.github.ocrmypdf.0o4cihvf/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7efdf61e52e8>.returncode

tests/conftest.py:116: AssertionError
____________________ test_exotic_image[pdfa-auto-jbig2.pdf] ____________________
[gw2] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'jbig2.pdf', renderer = 'auto', output_type = 'pdfa'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw2/test_exotic_image_pdfa_auto_jb0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file = 
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/jbig2.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw2/test_exotic_image_pdfa_auto_jb0/test_jbig2.pdf_auto.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdfa', '--sidecar', ...)
p = <subprocess.Popen object at 0x7f5b04c72b38>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/jbig2.pdf,
/tmp/com.github.ocrmypdf.ksoii9ft/origin)
E           ERROR - [Errno 13] Permission denied
E
E         </stderr>
E       assert 15 == 0
E        +  where 15 = <subprocess.Popen object at 0x7f5b04c72b38>.returncode

tests/conftest.py:116: AssertionError
________________ test_exotic_image[pdfa-auto-lichtenstein.pdf] _________________
[gw3] linux -- Python 3.6.4 /usr/bin/python3

spoof_tesseract_cache = {'CFLAGS': '-g -O2
-fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=. -fstack-protector-strong
-Wformat -Werror=format-security', 'DEB_BUILD_ARCH': 'amd64', ...}
pdf = 'lichtenstein.pdf', renderer = 'auto', output_type = 'pdfa'
resources = PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources')
outdir =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw3/test_exotic_image_pdfa_auto_li0')

    @pytest.mark.parametrize(
        "pdf",
        ['palette.pdf', 'cmyk.pdf', 'ccitt.pdf', 'jbig2.pdf', 
'lichtenstein.pdf'])
    @pytest.mark.parametrize("renderer", ['auto', 'tesseract'])
    @pytest.mark.parametrize("output_type", ['pdf', 'pdfa'])
    def test_exotic_image(spoof_tesseract_cache, pdf, renderer, output_type,
                          resources, outdir):
        outfile = outdir / 'test_{0}_{1}.pdf'.format(pdf, renderer)
        check_ocrmypdf(
            resources / pdf,
            outfile,
            '-dc',
            '-v', '1',
            '--output-type', output_type,
            '--sidecar',
>           '--pdf-renderer', renderer, env=spoof_tesseract_cache)

tests/test_main.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

input_file =
PosixPath('/home/packages/tmp/ocrmypdf-5.5/tests/resources/lichtenstein.pdf')
output_file =
PosixPath('/tmp/pytest-of-doko/pytest-1/popen-gw3/test_exotic_image_pdfa_auto_li0/test_lichtenstein.pdf_auto.pdf')
env = {'CFLAGS': '-g -O2 -fdebug-prefix-map=/home/packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=form...packages/tmp/ocrmypdf-5.5=.
-fstack-protector-strong -Wformat -Werror=format-security', 'DEB_BUILD_ARCH':
'amd64', ...}
args = ('-dc', '-v', '1', '--output-type', 'pdfa', '--sidecar', ...)
p = <subprocess.Popen object at 0x7fd3e0a710f0>, out = ''

    @pytest.helpers.register
    def check_ocrmypdf(input_file, output_file, *args, env=None):
        "Run ocrmypdf and confirmed that a valid file was created"

        p, out, err = run_ocrmypdf(input_file, output_file, *args, env=env)
        #print(err)  # ensure py.test collects the output, use -s to view
>       assert p.returncode == 0, "<stderr>\n" + err + "\n</stderr>"
E       AssertionError: <stderr>
E           DEBUG - ocrmypdf 5.5
E           DEBUG - tesseract 4.00.00alpha
E           DEBUG - qpdf 7.1.0
E            INFO - Tesseract v4.x.alpha found.
E           DEBUG -
os.symlink(/home/packages/tmp/ocrmypdf-5.5/tests/resources/lichtenstein.pdf,
/tmp/com.github.ocrmypdf.bp8zjj04/orig

Reply via email to