From cab381a339e4e1e86337c56db1bee252c7844d81 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Sat, 20 Feb 2016 05:13:19 -0800 Subject: [PATCH] Add JPEG 2000 test case --- tests/resources/README.rst | 8 ++++++-- tests/test_main.py | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/resources/README.rst b/tests/resources/README.rst index d7ce2f8f..edb0e81e 100644 --- a/tests/resources/README.rst +++ b/tests/resources/README.rst @@ -18,9 +18,11 @@ In some cases they were converted from one image format to another without other +---------------------+--------------------------------------------------------------------------------+ | graph.pdf | `Wikimedia: Pandas text analysis.png`_ | +---------------------+--------------------------------------------------------------------------------+ +| lichtenstein.pdf | `Wikimedia: JPEG2000 Lichtenstein`_ (Creative Commons BY-SA 3.0) | ++---------------------+--------------------------------------------------------------------------------+ | LinnSequencer.jpg | `Wikimedia: LinnSequencer`_ (Creative Commons Attribution-ShareAlike 3.0) | +---------------------+--------------------------------------------------------------------------------+ - + Files generated for this project ================================ @@ -58,4 +60,6 @@ These test resources are assemblies from other previously mentioned files, relea .. _`US Congressional Records`: http://www.baxleystamps.com/litho/meiji/courts_1871.jpg -.. _`Wikimedia: Pandas text analysis.png`: https://en.wikipedia.org/wiki/File:Pandas_text_analysis.png \ No newline at end of file +.. _`Wikimedia: Pandas text analysis.png`: https://en.wikipedia.org/wiki/File:Pandas_text_analysis.png + +.. _`Wikimedia: JPEG2000 Lichtenstein`: https://en.wikipedia.org/wiki/JPEG_2000#/media/File:Jpeg2000_2-level_wavelet_transform-lichtenstein.png \ No newline at end of file diff --git a/tests/test_main.py b/tests/test_main.py index bf3c3d1e..8fd95ef8 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -163,7 +163,9 @@ def test_clean(spoof_tesseract_noop): ('ccitt.pdf', 'hocr'), ('ccitt.pdf', 'tesseract'), ('jbig2.pdf', 'hocr'), - ('jbig2.pdf', 'tesseract') + ('jbig2.pdf', 'tesseract'), + ('lichtenstein.pdf', 'hocr'), + ('lichtenstein.pdf', 'tesseract') ]) def test_exotic_image(spoof_tesseract_cache, pdf, renderer): check_ocrmypdf(