From 7f08f15fc9483b33819b3b040b52a854a911fc39 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 15 Sep 2016 08:55:31 -0700 Subject: [PATCH] pytest skipif for milk.pdf test (#95) Skip the test if the fair use restricted milk.pdf is not present. --- tests/test_main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_main.py b/tests/test_main.py index 2389aafe..74f240ea 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -634,5 +634,7 @@ def test_masks(spoof_tesseract_noop): check_ocrmypdf('masks.pdf', 'test_masks.pdf', env=spoof_tesseract_noop) +@pytest.mark.skipif(not os.path.isfile(_infile('milk.pdf')), + reason="fair use restricted test resource does not exist") def test_linearized_pdf_and_indirect_object(spoof_tesseract_noop): check_ocrmypdf('milk.pdf', 'test_milk.pdf', env=spoof_tesseract_noop)