[Python-modules-commits] r20757 - in packages/sphinx/trunk/debian (3 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Tue Mar 13 15:25:03 UTC 2012


    Date: Tuesday, March 13, 2012 @ 15:25:01
  Author: jwilk
Revision: 20757

If LaTeX is not found when running test_build_latex, raise SkipTest instead of just printing a message to stderr.

Added:
  packages/sphinx/trunk/debian/patches/skiptest_latex.diff
Modified:
  packages/sphinx/trunk/debian/changelog
  packages/sphinx/trunk/debian/patches/series

Modified: packages/sphinx/trunk/debian/changelog
===================================================================
--- packages/sphinx/trunk/debian/changelog	2012-03-13 07:16:50 UTC (rev 20756)
+++ packages/sphinx/trunk/debian/changelog	2012-03-13 15:25:01 UTC (rev 20757)
@@ -1,3 +1,11 @@
+sphinx (1.1.3+dfsg-2) UNRELEASED; urgency=low
+
+  * Add skiptest_latex.diff: if LaTeX (or a required LaTeX package) is not
+    found when running test_build_latex, raise SkipTest instead of just
+    printing a message to stderr.  
+
+ -- Jakub Wilk <jwilk at debian.org>  Tue, 13 Mar 2012 16:08:11 +0100
+
 sphinx (1.1.3+dfsg-1) experimental; urgency=low
 
   * New upstream release.

Modified: packages/sphinx/trunk/debian/patches/series
===================================================================
--- packages/sphinx/trunk/debian/patches/series	2012-03-13 07:16:50 UTC (rev 20756)
+++ packages/sphinx/trunk/debian/patches/series	2012-03-13 15:25:01 UTC (rev 20757)
@@ -4,3 +4,4 @@
 initialize_autodoc.diff
 sphinxcontrib_namespace.diff
 python3_test_build_dir.diff
+skiptest_latex.diff

Added: packages/sphinx/trunk/debian/patches/skiptest_latex.diff
===================================================================
--- packages/sphinx/trunk/debian/patches/skiptest_latex.diff	                        (rev 0)
+++ packages/sphinx/trunk/debian/patches/skiptest_latex.diff	2012-03-13 15:25:01 UTC (rev 20757)
@@ -0,0 +1,41 @@
+Description: raise SkipTest if LaTeX (or a required LaTeX package) is not found
+ If LaTeX (or a required LaTeX package) is not found when running test_build_latex (or a required LaTeX package) is not found,
+ raise SkipTest instead of just printing a message to stderr.
+Author: Jakub Wilk <jwilk at debian.org>
+Forwarded: no
+Last-Update: 2012-03-13
+
+--- a/tests/test_build_latex.py
++++ b/tests/test_build_latex.py
+@@ -18,6 +18,7 @@
+ from sphinx.writers.latex import LaTeXTranslator
+ 
+ from util import *
++from util import SkipTest
+ from test_build_html import ENV_WARNINGS
+ 
+ 
+@@ -68,17 +69,17 @@
+             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 ' \
++            raise SkipTest(
++                  'not running latex, the %s package doesn\'t ' \
+                   'seem to be installed' % filename
+-            return
++            )
+ 
+     # now, try to run latex over it
+     cwd = os.getcwd()




More information about the Python-modules-commits mailing list