summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_textwrap.py
Commit message (Collapse)AuthorAgeFilesLines
* Patch #1581073: add a flag to textwrap that prevents the dropping ofGeorg Brandl2007-03-131-0/+8
| | | | whitespace while wrapping.
* Whitespace normalization.Tim Peters2006-06-111-1/+1
|
* Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately,Greg Ward2006-06-111-11/+50
| | | | | i.e. do *not* expand tabs, but treat them as whitespace that is not equivalent to spaces. Add a couple of test cases. Clarify docs.
* Disable a few other tests, that can't work if Python is compiled withoutWalter Dörwald2005-08-031-11/+12
| | | | Unicode support.
* SF #1149508: ensure textwrap handles hyphenated numbers correctly,Greg Ward2005-03-051-0/+18
| | | | eg. "2004-03-04" is not broken across lines. (Merged from 2.4 branch.)
* Whitespace normalization.Tim Peters2004-07-081-1/+1
|
* SF #965425: fix so hyphenated words surrounded by punctuation areGreg Ward2004-06-031-1/+18
| | | | wrapped correctly.
* SF #847346: merge from release23-maint branch: remove misguidedGreg Ward2004-05-131-4/+42
| | | | | optimization for short input; beef up tests for fix_sentence_endings feature.
* SF patch #806246: use basestring where possibleRaymond Hettinger2003-09-171-1/+1
| | | | (Contributed by George Yoshida.)
* SF bug 797650: Infinite loop in textwrap.pyRaymond Hettinger2003-08-301-0/+10
| | | | | | When the indents were set to longer than the width and long word breaking was enabled, an infinite loop would result because the inner loop did not assure that at least one character was stripped off on every pass.
* Add DedentTestCase to test dedent() function.Greg Ward2003-05-081-3/+68
|
* SF #596434: add test_funky_parens() to probe some more of the trickyGreg Ward2003-05-071-3/+19
| | | | edge cases that David Goodger reported long ago (July 2002?).
* SF #726446: ensure wrap() raises ValueError when width <= 0.Greg Ward2003-05-071-0/+6
|
* Combine the functionality of test_support.run_unittest()Walter Dörwald2003-05-011-5/+1
| | | | | | | | | | and test_support.run_classtests() into run_unittest() and use it wherever possible. Also don't use "from test.test_support import ...", but "from test import test_support" in a few spots. From SF patch #662807.
* Add test_unicode() to ensure that 1) textwrap doesn't crash on unicodeGreg Ward2002-12-091-0/+12
| | | | | input, and 2) unicode input means unicode output. This closes SF bug #622831.
* Added test_initial_whitespace() to ensure that SF bug #622849 is fixed.Greg Ward2002-12-091-3/+13
| | | | | | Change LongWordTestCase.setUp() -- remove leading whitespace from text string. Comment fix.
* Ad test_funky_hyphens() to test some screwy edge cases reported in SFGreg Ward2002-10-311-5/+18
| | | | | | | bug #596434. (Alas, I don't think this completely covers that bug.) Remove 'wrapper' argument from BaseTestCase.check_split() -- it's not actually needed.
* Fix an endcase bug: initial_indent was ignored when the text was shortGuido van Rossum2002-10-021-3/+13
| | | | enough to fit in one line.
* Test an em-dash with adjacent punctuation.Greg Ward2002-08-221-0/+6
|
* Factored out BaseTestCase.check_split() method -- use it whereverGreg Ward2002-08-221-8/+8
| | | | we need to test TextWrapper._split().
* Test _split() method in test_unix_options().Greg Ward2002-08-221-0/+9
|
* Add test_unix_options() to WrapTestCase to test for SF bug #596434.Greg Ward2002-08-221-0/+28
|
* Standardize behavior: no docstrings in test functions. Also stripGuido van Rossum2002-08-221-16/+16
| | | | trailing whitespace.
* Add test_em_dash() to WrapTestCase to make sure that TextWrapper handlesGreg Ward2002-08-221-2/+53
| | | | | em-dashes -- like this -- properly. (Also--like this. Although this usage may be incompatible with fixing bug #596434; we shall see.)
* Simplification/cleanup in IndentTestCases.Greg Ward2002-08-221-16/+10
|
* Factor LongWordTestCase out of WrapTestCase, and rename its methodsGreg Ward2002-08-221-13/+14
| | | | | (tests) from test_funky_punc() to test_break_long() and test_long_words() to test_nobreak_long().
* Rename base test case class to (yawn) BaseTestCase.Greg Ward2002-08-221-3/+3
|
* Ditch the whole loop-over-subcases way of working. Add check_wrap() toGreg Ward2002-08-221-74/+59
| | | | | | | base class (WrapperTestCase) instead, and call it repeatedly in the methods that used to have a loop-over-subcases. Much simpler. Rename perennial temp variable 't' to 'text'.
* Simplify and reformat the use of 'subcases' lists (and followingGreg Ward2002-08-221-52/+32
| | | | | for-loops) in test_simple(), test_wrap_short() test_hyphenated(), and test_funky_punc().
* Add comment header block.Greg Ward2002-08-221-12/+10
| | | | | Remove some useless comments (redundant, or info presumably available in PyUnit docs).
* Conform to standards documented in README:Greg Ward2002-08-221-15/+19
| | | | | | | * lowercase test*() methods * define test_main() and use it instead of unittest.main() Kill #! line. Improve some test names and docstrings.
* Test script for the textwrap module. Kindly provided by Peter HansenGreg Ward2002-08-221-0/+261
<peter@engcorp.com> based on a test script that's been kicking around my home directory for a couple of months now and only saw the light of day because I included it when I sent textwrap.py to python-dev for review.