aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_pdf.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2013-04-15 23:34:27 +0200
committerElrond <elrond+mediagoblin.org@samba-tng.org>2013-04-16 23:39:01 +0200
commit54b3113abc464f1401cda60b236e134935649f9a (patch)
treead8fecce05c9740086d2bbe651bffabe3b8b5b31 /mediagoblin/tests/test_pdf.py
parent24b1683b0dc1d9be1cb664310768f9e08e85d7e5 (diff)
downloadmediagoblin-54b3113abc464f1401cda60b236e134935649f9a.tar.lz
mediagoblin-54b3113abc464f1401cda60b236e134935649f9a.tar.xz
mediagoblin-54b3113abc464f1401cda60b236e134935649f9a.zip
PDF: Use pytest.mark.skipif for skipping tests
Instead of leaving test early if they can not run, use the pytest.mark.skipif marked to tell the test system not to even run the test. This also adds to the stats, because skipped tests are counted differently. Thus making it obvious, that some tests did not run, because of any reason.
Diffstat (limited to 'mediagoblin/tests/test_pdf.py')
-rw-r--r--mediagoblin/tests/test_pdf.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/mediagoblin/tests/test_pdf.py b/mediagoblin/tests/test_pdf.py
index a3979a25..b8c21bdb 100644
--- a/mediagoblin/tests/test_pdf.py
+++ b/mediagoblin/tests/test_pdf.py
@@ -17,16 +17,15 @@
import tempfile
import shutil
import os
-
+import pytest
from mediagoblin.media_types.pdf.processing import (
pdf_info, check_prerequisites, create_pdf_thumb)
GOOD='mediagoblin/tests/test_submission/good.pdf'
+@pytest.mark.skipif("not check_prerequisites()")
def test_pdf():
- if not check_prerequisites():
- return
good_dict = {'pdf_version_major': 1, 'pdf_title': '',
'pdf_page_size_width': 612, 'pdf_author': '',
'pdf_keywords': '', 'pdf_pages': 10,