Rev 5921: Skip tests broken by sphinx monkeypatching in file:///home/vila/src/bzr/bugs/785098-utextwrap-failure/

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu May 26 18:26:46 UTC 2011


At file:///home/vila/src/bzr/bugs/785098-utextwrap-failure/

------------------------------------------------------------
revno: 5921
revision-id: v.ladeuil+lp at free.fr-20110526182645-8mbh14c1p17064dc
parent: pqm at pqm.ubuntu.com-20110526174823-e1cfgzd0lcvsszcr
fixes bug(s): https://launchpad.net/bugs/785098
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 785098-utextwrap-failure
timestamp: Thu 2011-05-26 20:26:45 +0200
message:
  Skip tests broken by sphinx monkeypatching
-------------- next part --------------
=== 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