summaryrefslogtreecommitdiff
path: root/tests/test_build_latex.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-04-01 11:26:21 +0200
committerGeorg Brandl <georg@python.org>2013-04-01 11:26:21 +0200
commit031582c0b85de68dbcaf2cf9377c513deee1d0be (patch)
treea3aa2c1735334ce14f1d6f753e7a42bdfd5f17ea /tests/test_build_latex.py
parent004356df7d932357069afdb8386ac6bfb83147ad (diff)
downloadsphinx-031582c0b85de68dbcaf2cf9377c513deee1d0be.tar.gz
Closes #896: use SkipTest in build_latex test if latex is not installed
Diffstat (limited to 'tests/test_build_latex.py')
-rw-r--r--tests/test_build_latex.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py
index 721b3a2d..b7e21077 100644
--- a/tests/test_build_latex.py
+++ b/tests/test_build_latex.py
@@ -18,6 +18,7 @@ from subprocess import Popen, PIPE
from sphinx.writers.latex import LaTeXTranslator
from util import *
+from util import SkipTest
from test_build_html import ENV_WARNINGS
@@ -69,17 +70,13 @@ def test_latex(app):
return True
if kpsetest('article.sty') is None:
- print >>sys.stderr, \
- 'info: not running latex, it doesn\'t seem to be installed'
- return
+ raise SkipTest('not running latex, it doesn\'t seem to be installed')
for filename in ['fancyhdr.sty', 'fancybox.sty', 'titlesec.sty',
'amsmath.sty', 'framed.sty', 'color.sty', 'fancyvrb.sty',
'threeparttable.sty']:
if not kpsetest(filename):
- print >>sys.stderr, \
- 'info: not running latex, the %s package doesn\'t ' \
- 'seem to be installed' % filename
- return
+ raise SkipTest('not running latex, the %s package doesn\'t '
+ 'seem to be installed' % filename)
# now, try to run latex over it
cwd = os.getcwd()