diff --git a/tests/test_pdfinfo.py b/tests/test_pdfinfo.py index 16cc5918..415fc193 100644 --- a/tests/test_pdfinfo.py +++ b/tests/test_pdfinfo.py @@ -4,6 +4,7 @@ from __future__ import annotations import pickle +import warnings from io import BytesIO from math import isclose @@ -20,6 +21,10 @@ from ocrmypdf.helpers import IMG2PDF_KWARGS, Resolution from ocrmypdf.pdfinfo import Colorspace, Encoding from ocrmypdf.pdfinfo.layout import PDFPage +warnings.filterwarnings( + "ignore", category=DeprecationWarning, module="reportlab.lib.rl_safe_eval" +) + # pylint: disable=protected-access diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py index 9eb6a820..4eb37463 100644 --- a/tests/test_pipeline.py +++ b/tests/test_pipeline.py @@ -3,6 +3,7 @@ from __future__ import annotations +import warnings from unittest.mock import Mock import pytest @@ -14,6 +15,10 @@ from reportlab.pdfgen.canvas import Canvas from ocrmypdf import _pipeline, pdfinfo from ocrmypdf.helpers import Resolution +warnings.filterwarnings( + "ignore", category=DeprecationWarning, module="reportlab.lib.rl_safe_eval" +) + @pytest.fixture(scope='session') def rgb_image(): diff --git a/tests/test_rotation.py b/tests/test_rotation.py index c610a205..cac7e103 100644 --- a/tests/test_rotation.py +++ b/tests/test_rotation.py @@ -4,6 +4,7 @@ from __future__ import annotations import operator +import warnings from io import BytesIO from math import cos, pi, sin from os import fspath @@ -21,6 +22,10 @@ from ocrmypdf.pdfinfo import PdfInfo from .conftest import check_ocrmypdf, run_ocrmypdf_api +warnings.filterwarnings( + "ignore", category=DeprecationWarning, module="reportlab.lib.rl_safe_eval" +) + # pylintx: disable=unused-variable RENDERERS = ['hocr', 'sandwich']