Commit Graph

15 Commits

Author SHA1 Message Date
Guido van Rossum eb287a2662 Fix an endcase bug: initial_indent was ignored when the text was short
enough to fit in one line.
2002-10-02 15:47:32 +00:00
Greg Ward c6edb37268 Test an em-dash with adjacent punctuation. 2002-08-22 21:27:05 +00:00
Greg Ward 715debd3d1 Factored out BaseTestCase.check_split() method -- use it wherever
we need to test TextWrapper._split().
2002-08-22 21:16:25 +00:00
Greg Ward 24a1c9cff5 Test _split() method in test_unix_options(). 2002-08-22 21:12:54 +00:00
Greg Ward 34f995b3c1 Add test_unix_options() to WrapTestCase to test for SF bug #596434. 2002-08-22 21:10:07 +00:00
Guido van Rossum 327af775b8 Standardize behavior: no docstrings in test functions. Also strip
trailing whitespace.
2002-08-22 20:13:47 +00:00
Greg Ward 9ad15a3dff Add test_em_dash() to WrapTestCase to make sure that TextWrapper handles
em-dashes -- like this -- properly.  (Also--like this.  Although this
usage may be incompatible with fixing bug #596434; we shall see.)
2002-08-22 19:47:27 +00:00
Greg Ward f69d3c9849 Simplification/cleanup in IndentTestCases. 2002-08-22 19:06:45 +00:00
Greg Ward fd030e46a7 Factor LongWordTestCase out of WrapTestCase, and rename its methods
(tests) from test_funky_punc() to test_break_long() and
test_long_words() to test_nobreak_long().
2002-08-22 19:02:37 +00:00
Greg Ward 13c53c64db Rename base test case class to (yawn) BaseTestCase. 2002-08-22 18:57:26 +00:00
Greg Ward ee413849b5 Ditch the whole loop-over-subcases way of working. Add check_wrap() to
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'.
2002-08-22 18:55:38 +00:00
Greg Ward 9ebba9ace3 Simplify and reformat the use of 'subcases' lists (and following
for-loops) in test_simple(), test_wrap_short() test_hyphenated(), and
test_funky_punc().
2002-08-22 18:45:02 +00:00
Greg Ward 3dc94e14c0 Add comment header block.
Remove some useless comments (redundant, or info presumably available in
  PyUnit docs).
2002-08-22 18:37:50 +00:00
Greg Ward f67657811c Conform to standards documented in README:
*  lowercase test*() methods
  * define test_main() and use it instead of unittest.main()
Kill #! line.
Improve some test names and docstrings.
2002-08-22 18:35:49 +00:00
Greg Ward 90c0b071ed Test script for the textwrap module. Kindly provided by Peter Hansen
<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.
2002-08-22 18:11:10 +00:00