diff options
| author | Georg Brandl <georg@python.org> | 2007-03-13 18:15:41 (GMT) |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2007-03-13 18:15:41 (GMT) |
| commit | 9e6b47002a563473ec966ac4d353b99df986f642 (patch) | |
| tree | 773fe857bc89bda60d0fb53213b723879a0a47c7 /Lib/test/test_textwrap.py | |
| parent | 92a6baed7bfae3eaad31c47c5d80348b05a62d8c (diff) | |
| download | cpython-9e6b47002a563473ec966ac4d353b99df986f642.zip cpython-9e6b47002a563473ec966ac4d353b99df986f642.tar.gz cpython-9e6b47002a563473ec966ac4d353b99df986f642.tar.bz2 | |
Patch #1581073: add a flag to textwrap that prevents the dropping of
whitespace while wrapping.
Diffstat (limited to 'Lib/test/test_textwrap.py')
| -rw-r--r-- | Lib/test/test_textwrap.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_textwrap.py b/Lib/test/test_textwrap.py index 500eceb..5f0b51b 100644 --- a/Lib/test/test_textwrap.py +++ b/Lib/test/test_textwrap.py @@ -328,6 +328,14 @@ What a mess! self.check_wrap(text, 30, [" This is a sentence with", "leading whitespace."]) + def test_no_drop_whitespace(self): + # SF patch #1581073 + text = " This is a sentence with much whitespace." + self.check_wrap(text, 10, + [" This is a", " ", "sentence ", + "with ", "much white", "space."], + drop_whitespace=False) + if test_support.have_unicode: def test_unicode(self): # *Very* simple test of wrapping Unicode strings. I'm sure |
