diff options
author | Walter Dörwald <walter@livinglogic.de> | 2005-08-03 17:09:04 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2005-08-03 17:09:04 (GMT) |
commit | 4e41a4b64cb9e69d15ebe0cdf752c5e105318a94 (patch) | |
tree | 84023b8389b53f9847b961a7b5f36c425ef94da9 /Lib/test/test_textwrap.py | |
parent | 649f8e7de2ad8fc42748b56e8e64574478d2d7fe (diff) | |
download | cpython-4e41a4b64cb9e69d15ebe0cdf752c5e105318a94.zip cpython-4e41a4b64cb9e69d15ebe0cdf752c5e105318a94.tar.gz cpython-4e41a4b64cb9e69d15ebe0cdf752c5e105318a94.tar.bz2 |
Disable a few other tests, that can't work if Python is compiled without
Unicode support.
Diffstat (limited to 'Lib/test/test_textwrap.py')
-rw-r--r-- | Lib/test/test_textwrap.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/Lib/test/test_textwrap.py b/Lib/test/test_textwrap.py index a21b7ce..68e4d6d 100644 --- a/Lib/test/test_textwrap.py +++ b/Lib/test/test_textwrap.py @@ -328,17 +328,18 @@ What a mess! self.check_wrap(text, 30, [" This is a sentence with", "leading whitespace."]) - def test_unicode(self): - # *Very* simple test of wrapping Unicode strings. I'm sure - # there's more to it than this, but let's at least make - # sure textwrap doesn't crash on Unicode input! - text = u"Hello there, how are you today?" - self.check_wrap(text, 50, [u"Hello there, how are you today?"]) - self.check_wrap(text, 20, [u"Hello there, how are", "you today?"]) - olines = self.wrapper.wrap(text) - assert isinstance(olines, list) and isinstance(olines[0], unicode) - otext = self.wrapper.fill(text) - assert isinstance(otext, unicode) + if test_support.have_unicode: + def test_unicode(self): + # *Very* simple test of wrapping Unicode strings. I'm sure + # there's more to it than this, but let's at least make + # sure textwrap doesn't crash on Unicode input! + text = u"Hello there, how are you today?" + self.check_wrap(text, 50, [u"Hello there, how are you today?"]) + self.check_wrap(text, 20, [u"Hello there, how are", "you today?"]) + olines = self.wrapper.wrap(text) + assert isinstance(olines, list) and isinstance(olines[0], unicode) + otext = self.wrapper.fill(text) + assert isinstance(otext, unicode) def test_split(self): # Ensure that the standard _split() method works as advertised |