From 703b6db95c5e838a841e39674cfce0850018ec03 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Mon, 11 Nov 2019 22:58:48 -0800 Subject: [PATCH] test: fix test_report_file_size --- tests/test_validation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_validation.py b/tests/test_validation.py index 78181e41..7f2ece47 100644 --- a/tests/test_validation.py +++ b/tests/test_validation.py @@ -120,8 +120,9 @@ def test_report_file_size(tmp_path, caplog): os.truncate(in_, 25001) os.truncate(out, 50000) - vd.report_output_file_size(opts, in_, out) - assert 'No reason' in caplog.text + with patch('ocrmypdf._validation.jbig2enc.available', return_value=False): + vd.report_output_file_size(opts, in_, out) + assert 'No reason' in caplog.text caplog.clear() with patch('ocrmypdf._validation.jbig2enc.available', return_value=False):