diff --git a/.reuse/dep5 b/.reuse/dep5 index 989d2a11..f025677c 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -43,11 +43,15 @@ Files: Copyright: (C) 2022 James R. Barlow License: CC-BY-SA-4.0 +Files: + tests/resources/graph.pdf + tests/resources/graph_ocred.pdf +Copyright: (C) 2012 SmokeyJoe +License: GFDL-1.2-or-later or CC-BY-SA-3.0 + Files: tests/resources/c02-22.pdf tests/resources/congress.jpg tests/resources/multipage.pdf - tests/resources/graph.pdf - tests/resources/graph_ocred.pdf Copyright: Public domain License: public-domain Copyright on these files has expired. diff --git a/tests/resources/README.rst b/tests/resources/README.rst index a173fb6c..c83990ee 100644 --- a/tests/resources/README.rst +++ b/tests/resources/README.rst @@ -23,7 +23,7 @@ the copyright holder(s) and license(s) applicable to these resources. - `US Congressional Records`_ - difficult OCR image (color background) * - graph.pdf - - `Wikimedia: Pandas text analysis.png`_ + - `Wikimedia:Simple_line_graph_of_ACE_2012_results_by_candidate_sj01.png`_ - image with slanted text * - lichtenstein.pdf - `Wikimedia: JPEG2000 Lichtenstein`_ @@ -127,7 +127,7 @@ These test resources are assemblies or derivatives from other previously mention .. _`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 +.. _`Wikimedia: Simple_line_graph_of_ACE_2012_results_by_candidate_sj01.png`: https://en.wikipedia.org/wiki/File:Simple_line_graph_of_ACE_2012_results_by_candidate_sj01.png .. _`Wikimedia: JPEG2000 Lichtenstein`: https://en.wikipedia.org/wiki/JPEG_2000#/media/File:Jpeg2000_2-level_wavelet_transform-lichtenstein.png diff --git a/tests/resources/graph.pdf b/tests/resources/graph.pdf index 9b48e608..a30ae549 100644 Binary files a/tests/resources/graph.pdf and b/tests/resources/graph.pdf differ diff --git a/tests/resources/graph_ocred.pdf b/tests/resources/graph_ocred.pdf index 46ac8fc2..f58194f0 100644 Binary files a/tests/resources/graph_ocred.pdf and b/tests/resources/graph_ocred.pdf differ diff --git a/tests/resources/multipage.pdf b/tests/resources/multipage.pdf old mode 100644 new mode 100755 index 80351bed..b3240567 Binary files a/tests/resources/multipage.pdf and b/tests/resources/multipage.pdf differ diff --git a/tests/test_rotation.py b/tests/test_rotation.py index 1fad82e5..130c6922 100644 --- a/tests/test_rotation.py +++ b/tests/test_rotation.py @@ -276,7 +276,8 @@ def test_rasterize_rotates(resources, tmp_path): rotation=90, filter_vector=False, ) - assert Image.open(img).size == (123, 151), "Image not rotated" + with Image.open(img) as im: + assert im.size == (83, 200), "Image not rotated" img = tmp_path / 'img180.png' pm.hook.rasterize_pdf_page( @@ -289,7 +290,7 @@ def test_rasterize_rotates(resources, tmp_path): rotation=180, filter_vector=False, ) - assert Image.open(img).size == (151, 123), "Image not rotated" + assert Image.open(img).size == (200, 83), "Image not rotated" def test_simulated_scan(outdir):