diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-04-15 23:34:27 +0200 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-04-16 23:39:01 +0200 |
commit | 54b3113abc464f1401cda60b236e134935649f9a (patch) | |
tree | ad8fecce05c9740086d2bbe651bffabe3b8b5b31 /mediagoblin/tests/test_submission.py | |
parent | 24b1683b0dc1d9be1cb664310768f9e08e85d7e5 (diff) | |
download | mediagoblin-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_submission.py')
-rw-r--r-- | mediagoblin/tests/test_submission.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/tests/test_submission.py b/mediagoblin/tests/test_submission.py index 462a1653..7c9b3115 100644 --- a/mediagoblin/tests/test_submission.py +++ b/mediagoblin/tests/test_submission.py @@ -20,6 +20,7 @@ sys.setdefaultencoding('utf-8') import urlparse import os +import pytest from pkg_resources import resource_filename @@ -128,9 +129,8 @@ class TestSubmission: self._setup(test_app) self.check_normal_upload(u'Normal upload 2', GOOD_PNG) + @pytest.mark.skipif("not pdf_check_prerequisites()") def test_normal_pdf(self, test_app): - if not pdf_check_prerequisites(): - return self._setup(test_app) response, context = self.do_post({'title': u'Normal upload 3 (pdf)'}, do_follow=True, |