Rev 5931: (vila) Skip tests broken by sphinx monkeypatching (Vincent Ladeuil) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri May 27 22:38:43 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5931 [merge]
revision-id: pqm at pqm.ubuntu.com-20110527223837-54h5nrj2y10wgj8o
parent: pqm at pqm.ubuntu.com-20110527191338-i1gu6p7xrmagd2l7
parent: v.ladeuil+lp at free.fr-20110526182645-8mbh14c1p17064dc
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2011-05-27 22:38:37 +0000
message:
  (vila) Skip tests broken by sphinx monkeypatching (Vincent Ladeuil)
modified:
  bzrlib/tests/test_utextwrap.py test_utextwrap.py-20110504151300-vdvrs19wd20a5cy0-1
=== modified file 'bzrlib/tests/test_utextwrap.py'
--- a/bzrlib/tests/test_utextwrap.py	2011-05-14 14:59:06 +0000
+++ b/bzrlib/tests/test_utextwrap.py	2011-05-26 18:26:45 +0000
@@ -17,8 +17,12 @@
 
 """Tests of the bzrlib.utextwrap."""
 
-from bzrlib import tests, utextwrap
-from bzrlib.tests import TestSkipped
+from bzrlib import (
+    tests,
+    utextwrap,
+    )
+from bzrlib.tests import features
+
 
 # Japanese "Good morning".
 # Each character have double width. So total 8 width on console.
@@ -167,6 +171,15 @@
 
 
     def setup_both(testcase, base_class, reused_class):
+        
+        if (features.sphinx.available()):
+            # Until https://bitbucket.org/birkenfeld/sphinx/issue/706 is fixed,
+            # we can't run these tests when sphinx <= 1.0.1
+            version = tuple(map(int,
+                                features.sphinx.module.__version__.split('.')))
+            if version <= (1, 0, 1):
+                raise tests.TestSkipped('sphinx monkeypatch textwrap')
+        testcase.debug()
         super(base_class, testcase).setUp()
         override_textwrap_symbols(testcase)
         reused_class.setUp(testcase)
@@ -194,14 +207,14 @@
     class TestWrap(tests.TestCase):
 
         def test_wrap(self):
-            raise TestSkipped("test.test_textwrap is not avialable.")
+            raise tests.TestSkipped("test.test_textwrap is not available.")
 
     class TestLongWord(tests.TestCase):
 
         def test_longword(self):
-            raise TestSkipped("test.test_textwrap is not avialable.")
+            raise tests.TestSkipped("test.test_textwrap is not available.")
 
     class TestIndent(tests.TestCase):
 
         def test_indent(self):
-            raise TestSkipped("test.test_textwrap is not avialable.")
+            raise tests.TestSkipped("test.test_textwrap is not available.")




More information about the bazaar-commits mailing list