From 501ce726e719d789963cb7d8be74320b95e1ca5e Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Tue, 6 Nov 2018 11:15:02 -0800 Subject: [PATCH] Fix two failing tests --- tests/test_lept.py | 6 +++--- tests/test_pdfinfo.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_lept.py b/tests/test_lept.py index 67d47bc5..04280b83 100644 --- a/tests/test_lept.py +++ b/tests/test_lept.py @@ -68,8 +68,8 @@ def test_crop(resources): assert foreground.width < pix.width -def test_clean_bg(crom_pix): - pix, _ = crom_pix +def test_clean_bg(resources): + pix = lept.Pix.open(resources / 'congress.jpg') imbg = pix.clean_background_to_white() @@ -86,4 +86,4 @@ def test_leptonica_compile(tmpdir): # Compile the library but build it somewhere that won't interfere with # existing compiled library. Also compile in API mode so that we test # the interfaces, even though we use it ABI mode. - ffibuilder.compile(tmpdir=tmpdir, target=(tmpdir /'lepttest.*')) + ffibuilder.compile(tmpdir=tmpdir, target=(tmpdir / 'lepttest.*')) diff --git a/tests/test_pdfinfo.py b/tests/test_pdfinfo.py index 51bdf820..85f51311 100644 --- a/tests/test_pdfinfo.py +++ b/tests/test_pdfinfo.py @@ -151,7 +151,7 @@ def test_pickle(resources): def test_regex(): - rx = pdfinfo.regex_remove_char_tags + rx = pdfinfo.ghosttext.regex_remove_char_tags must_match = [ b'',