"Fossies" - the Fresh Open Source Software Archive

Member "OCRmyPDF-8.3.0/tests/test_qpdf.py" (13 May 2019, 874 Bytes) of package /linux/privat/OCRmyPDF-8.3.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # © 2018 James R. Barlow: github.com/jbarlow83
    2 #
    3 # This file is part of OCRmyPDF.
    4 #
    5 # OCRmyPDF is free software: you can redistribute it and/or modify
    6 # it under the terms of the GNU General Public License as published by
    7 # the Free Software Foundation, either version 3 of the License, or
    8 # (at your option) any later version.
    9 #
   10 # OCRmyPDF is distributed in the hope that it will be useful,
   11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
   12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13 # GNU General Public License for more details.
   14 #
   15 # You should have received a copy of the GNU General Public License
   16 # along with OCRmyPDF.  If not, see <http://www.gnu.org/licenses/>.
   17 
   18 import pytest
   19 
   20 import ocrmypdf.exec.qpdf as qpdf
   21 
   22 
   23 def test_qpdf_error(resources):
   24     assert qpdf.check(resources / 'blank.pdf')
   25     assert not qpdf.check(__file__)