~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_utextwrap.py

  • Committer: Jelmer Vernooij
  • Date: 2011-08-04 13:30:30 UTC
  • mfrom: (6050 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6052.
  • Revision ID: jelmer@samba.org-20110804133030-uwo00unp8b0n782c
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Tests of the bzrlib.utextwrap."""
19
19
 
20
 
from bzrlib import tests, utextwrap
21
 
from bzrlib.tests import TestSkipped
 
20
from bzrlib import (
 
21
    tests,
 
22
    utextwrap,
 
23
    )
 
24
from bzrlib.tests import features
 
25
 
22
26
 
23
27
# Japanese "Good morning".
24
28
# Each character have double width. So total 8 width on console.
167
171
 
168
172
 
169
173
    def setup_both(testcase, base_class, reused_class):
 
174
 
 
175
        if (features.sphinx.available()):
 
176
            # Until https://bitbucket.org/birkenfeld/sphinx/issue/706 is fixed,
 
177
            # we can't run these tests when sphinx <= 1.0.1 as it breaks
 
178
            # textwrap.TextWrapper.wordsep_re
 
179
            version = tuple(map(int,
 
180
                                features.sphinx.module.__version__.split('.')))
 
181
            if version <= (1, 0, 7):
 
182
                raise tests.TestSkipped(
 
183
                    'sphinx textwrap monkeypatch breaks utextwrap')
170
184
        super(base_class, testcase).setUp()
171
185
        override_textwrap_symbols(testcase)
172
186
        reused_class.setUp(testcase)
194
208
    class TestWrap(tests.TestCase):
195
209
 
196
210
        def test_wrap(self):
197
 
            raise TestSkipped("test.test_textwrap is not avialable.")
 
211
            raise tests.TestSkipped("test.test_textwrap is not available.")
198
212
 
199
213
    class TestLongWord(tests.TestCase):
200
214
 
201
215
        def test_longword(self):
202
 
            raise TestSkipped("test.test_textwrap is not avialable.")
 
216
            raise tests.TestSkipped("test.test_textwrap is not available.")
203
217
 
204
218
    class TestIndent(tests.TestCase):
205
219
 
206
220
        def test_indent(self):
207
 
            raise TestSkipped("test.test_textwrap is not avialable.")
 
221
            raise tests.TestSkipped("test.test_textwrap is not available.")