mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
Patch #1581073: add a flag to textwrap that prevents the dropping of
whitespace while wrapping.
This commit is contained in:
parent
92a6baed7b
commit
9e6b47002a
4 changed files with 26 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue