Greg Ward | 3dc94e1 | 2002-08-22 18:37:50 +0000 | [diff] [blame] | 1 | # |
| 2 | # Test script for the textwrap module. |
| 3 | # |
| 4 | # Original tests written by Greg Ward <gward@python.net>. |
| 5 | # Converted to PyUnit by Peter Hansen <peter@engcorp.com>. |
| 6 | # Currently maintained by Greg Ward. |
| 7 | # |
| 8 | # $Id$ |
| 9 | # |
| 10 | |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 11 | import unittest |
Greg Ward | f676578 | 2002-08-22 18:35:49 +0000 | [diff] [blame] | 12 | from test import test_support |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 13 | |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 14 | from textwrap import TextWrapper, wrap, fill |
| 15 | |
| 16 | |
Greg Ward | 13c53c6 | 2002-08-22 18:57:26 +0000 | [diff] [blame] | 17 | class BaseTestCase(unittest.TestCase): |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 18 | '''Parent class with utility methods for textwrap tests.''' |
| 19 | |
| 20 | def show(self, textin): |
| 21 | if isinstance(textin, list): |
| 22 | result = [] |
| 23 | for i in range(len(textin)): |
| 24 | result.append(" %d: %r" % (i, textin[i])) |
| 25 | result = '\n'.join(result) |
| 26 | elif isinstance(textin, (str, unicode)): |
| 27 | result = " %s\n" % repr(textin) |
| 28 | return result |
| 29 | |
| 30 | |
| 31 | def check(self, result, expect): |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 32 | self.assertEquals(result, expect, |
Greg Ward | 9ad15a3 | 2002-08-22 19:47:27 +0000 | [diff] [blame] | 33 | 'expected:\n%s\nbut got:\n%s' % ( |
| 34 | self.show(expect), self.show(result))) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 35 | |
Guido van Rossum | eb287a2 | 2002-10-02 15:47:32 +0000 | [diff] [blame] | 36 | def check_wrap(self, text, width, expect, **kwargs): |
| 37 | result = wrap(text, width, **kwargs) |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 38 | self.check(result, expect) |
| 39 | |
Guido van Rossum | eb287a2 | 2002-10-02 15:47:32 +0000 | [diff] [blame] | 40 | def check_split(self, wrapper, text, expect): |
Greg Ward | 715debd | 2002-08-22 21:16:25 +0000 | [diff] [blame] | 41 | result = wrapper._split(text) |
| 42 | self.assertEquals(result, expect, |
| 43 | "\nexpected %r\n" |
| 44 | "but got %r" % (expect, result)) |
| 45 | |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 46 | |
Greg Ward | 13c53c6 | 2002-08-22 18:57:26 +0000 | [diff] [blame] | 47 | class WrapTestCase(BaseTestCase): |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 48 | |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 49 | def setUp(self): |
| 50 | self.wrapper = TextWrapper(width=45, fix_sentence_endings=True) |
| 51 | |
Greg Ward | f676578 | 2002-08-22 18:35:49 +0000 | [diff] [blame] | 52 | def test_simple(self): |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 53 | # Simple case: just words, spaces, and a bit of punctuation |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 54 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 55 | text = "Hello there, how are you this fine day? I'm glad to hear it!" |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 56 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 57 | self.check_wrap(text, 12, |
| 58 | ["Hello there,", |
| 59 | "how are you", |
| 60 | "this fine", |
| 61 | "day? I'm", |
| 62 | "glad to hear", |
| 63 | "it!"]) |
| 64 | self.check_wrap(text, 42, |
| 65 | ["Hello there, how are you this fine day?", |
| 66 | "I'm glad to hear it!"]) |
| 67 | self.check_wrap(text, 80, [text]) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 68 | |
| 69 | |
Greg Ward | f676578 | 2002-08-22 18:35:49 +0000 | [diff] [blame] | 70 | def test_whitespace(self): |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 71 | # Whitespace munging and end-of-sentence detection |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 72 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 73 | text = """\ |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 74 | This is a paragraph that already has |
| 75 | line breaks. But some of its lines are much longer than the others, |
| 76 | so it needs to be wrapped. |
| 77 | Some lines are \ttabbed too. |
| 78 | What a mess! |
| 79 | """ |
| 80 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 81 | expect = ["This is a paragraph that already has line", |
| 82 | "breaks. But some of its lines are much", |
| 83 | "longer than the others, so it needs to be", |
| 84 | "wrapped. Some lines are tabbed too. What a", |
| 85 | "mess!"] |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 86 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 87 | result = self.wrapper.wrap(text) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 88 | self.check(result, expect) |
| 89 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 90 | result = self.wrapper.fill(text) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 91 | self.check(result, '\n'.join(expect)) |
| 92 | |
| 93 | |
Greg Ward | f676578 | 2002-08-22 18:35:49 +0000 | [diff] [blame] | 94 | def test_wrap_short(self): |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 95 | # Wrapping to make short lines longer |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 96 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 97 | text = "This is a\nshort paragraph." |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 98 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 99 | self.check_wrap(text, 20, ["This is a short", |
| 100 | "paragraph."]) |
| 101 | self.check_wrap(text, 40, ["This is a short paragraph."]) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 102 | |
| 103 | |
Guido van Rossum | eb287a2 | 2002-10-02 15:47:32 +0000 | [diff] [blame] | 104 | def test_wrap_short_1line(self): |
| 105 | # Test endcases |
| 106 | |
| 107 | text = "This is a short line." |
| 108 | |
| 109 | self.check_wrap(text, 30, ["This is a short line."]) |
| 110 | self.check_wrap(text, 30, ["(1) This is a short line."], |
| 111 | initial_indent="(1) ") |
| 112 | |
| 113 | |
Greg Ward | f676578 | 2002-08-22 18:35:49 +0000 | [diff] [blame] | 114 | def test_hyphenated(self): |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 115 | # Test breaking hyphenated words |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 116 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 117 | text = ("this-is-a-useful-feature-for-" |
| 118 | "reformatting-posts-from-tim-peters'ly") |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 119 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 120 | self.check_wrap(text, 40, |
| 121 | ["this-is-a-useful-feature-for-", |
| 122 | "reformatting-posts-from-tim-peters'ly"]) |
| 123 | self.check_wrap(text, 41, |
| 124 | ["this-is-a-useful-feature-for-", |
| 125 | "reformatting-posts-from-tim-peters'ly"]) |
| 126 | self.check_wrap(text, 42, |
| 127 | ["this-is-a-useful-feature-for-reformatting-", |
| 128 | "posts-from-tim-peters'ly"]) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 129 | |
Greg Ward | 9ad15a3 | 2002-08-22 19:47:27 +0000 | [diff] [blame] | 130 | def test_em_dash(self): |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 131 | # Test text with em-dashes |
Greg Ward | 9ad15a3 | 2002-08-22 19:47:27 +0000 | [diff] [blame] | 132 | text = "Em-dashes should be written -- thus." |
| 133 | self.check_wrap(text, 25, |
| 134 | ["Em-dashes should be", |
| 135 | "written -- thus."]) |
| 136 | |
| 137 | # Probe the boundaries of the properly written em-dash, |
| 138 | # ie. " -- ". |
| 139 | self.check_wrap(text, 29, |
| 140 | ["Em-dashes should be written", |
| 141 | "-- thus."]) |
| 142 | expect = ["Em-dashes should be written --", |
| 143 | "thus."] |
| 144 | self.check_wrap(text, 30, expect) |
| 145 | self.check_wrap(text, 35, expect) |
| 146 | self.check_wrap(text, 36, |
| 147 | ["Em-dashes should be written -- thus."]) |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 148 | |
Greg Ward | 9ad15a3 | 2002-08-22 19:47:27 +0000 | [diff] [blame] | 149 | # The improperly written em-dash is handled too, because |
| 150 | # it's adjacent to non-whitespace on both sides. |
| 151 | text = "You can also do--this or even---this." |
| 152 | expect = ["You can also do", |
| 153 | "--this or even", |
| 154 | "---this."] |
| 155 | self.check_wrap(text, 15, expect) |
| 156 | self.check_wrap(text, 16, expect) |
| 157 | expect = ["You can also do--", |
| 158 | "this or even---", |
| 159 | "this."] |
| 160 | self.check_wrap(text, 17, expect) |
| 161 | self.check_wrap(text, 19, expect) |
| 162 | expect = ["You can also do--this or even", |
| 163 | "---this."] |
| 164 | self.check_wrap(text, 29, expect) |
| 165 | self.check_wrap(text, 31, expect) |
| 166 | expect = ["You can also do--this or even---", |
| 167 | "this."] |
| 168 | self.check_wrap(text, 32, expect) |
| 169 | self.check_wrap(text, 35, expect) |
| 170 | |
| 171 | # All of the above behaviour could be deduced by probing the |
| 172 | # _split() method. |
| 173 | text = "Here's an -- em-dash and--here's another---and another!" |
Greg Ward | 9ad15a3 | 2002-08-22 19:47:27 +0000 | [diff] [blame] | 174 | expect = ["Here's", " ", "an", " ", "--", " ", "em-", "dash", " ", |
| 175 | "and", "--", "here's", " ", "another", "---", |
| 176 | "and", " ", "another!"] |
Greg Ward | 715debd | 2002-08-22 21:16:25 +0000 | [diff] [blame] | 177 | self.check_split(self.wrapper, text, expect) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 178 | |
Greg Ward | c6edb37 | 2002-08-22 21:27:05 +0000 | [diff] [blame] | 179 | text = "and then--bam!--he was gone" |
| 180 | expect = ["and", " ", "then", "--", "bam!", "--", |
| 181 | "he", " ", "was", " ", "gone"] |
| 182 | self.check_split(self.wrapper, text, expect) |
| 183 | |
| 184 | |
Greg Ward | 34f995b | 2002-08-22 21:10:07 +0000 | [diff] [blame] | 185 | def test_unix_options (self): |
| 186 | # Test that Unix-style command-line options are wrapped correctly. |
| 187 | # Both Optik (OptionParser) and Docutils rely on this behaviour! |
| 188 | |
| 189 | text = "You should use the -n option, or --dry-run in its long form." |
| 190 | self.check_wrap(text, 20, |
| 191 | ["You should use the", |
| 192 | "-n option, or --dry-", |
| 193 | "run in its long", |
| 194 | "form."]) |
| 195 | self.check_wrap(text, 21, |
| 196 | ["You should use the -n", |
| 197 | "option, or --dry-run", |
| 198 | "in its long form."]) |
| 199 | expect = ["You should use the -n option, or", |
| 200 | "--dry-run in its long form."] |
| 201 | self.check_wrap(text, 32, expect) |
| 202 | self.check_wrap(text, 34, expect) |
| 203 | self.check_wrap(text, 35, expect) |
| 204 | self.check_wrap(text, 38, expect) |
| 205 | expect = ["You should use the -n option, or --dry-", |
| 206 | "run in its long form."] |
| 207 | self.check_wrap(text, 39, expect) |
| 208 | self.check_wrap(text, 41, expect) |
| 209 | expect = ["You should use the -n option, or --dry-run", |
| 210 | "in its long form."] |
| 211 | self.check_wrap(text, 42, expect) |
| 212 | |
Greg Ward | 24a1c9c | 2002-08-22 21:12:54 +0000 | [diff] [blame] | 213 | # Again, all of the above can be deduced from _split(). |
| 214 | text = "the -n option, or --dry-run or --dryrun" |
Greg Ward | 24a1c9c | 2002-08-22 21:12:54 +0000 | [diff] [blame] | 215 | expect = ["the", " ", "-n", " ", "option,", " ", "or", " ", |
| 216 | "--dry-", "run", " ", "or", " ", "--dryrun"] |
Greg Ward | 715debd | 2002-08-22 21:16:25 +0000 | [diff] [blame] | 217 | self.check_split(self.wrapper, text, expect) |
Greg Ward | 24a1c9c | 2002-08-22 21:12:54 +0000 | [diff] [blame] | 218 | |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 219 | def test_split(self): |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 220 | # Ensure that the standard _split() method works as advertised |
| 221 | # in the comments |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 222 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 223 | text = "Hello there -- you goof-ball, use the -b option!" |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 224 | |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 225 | result = self.wrapper._split(text) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 226 | self.check(result, |
| 227 | ["Hello", " ", "there", " ", "--", " ", "you", " ", "goof-", |
| 228 | "ball,", " ", "use", " ", "the", " ", "-b", " ", "option!"]) |
| 229 | |
| 230 | |
Greg Ward | fd030e4 | 2002-08-22 19:02:37 +0000 | [diff] [blame] | 231 | class LongWordTestCase (BaseTestCase): |
| 232 | def setUp(self): |
| 233 | self.wrapper = TextWrapper() |
| 234 | self.text = ''' |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 235 | Did you say "supercalifragilisticexpialidocious?" |
| 236 | How *do* you spell that odd word, anyways? |
| 237 | ''' |
Greg Ward | fd030e4 | 2002-08-22 19:02:37 +0000 | [diff] [blame] | 238 | |
| 239 | def test_break_long(self): |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 240 | # Wrap text with long words and lots of punctuation |
Greg Ward | fd030e4 | 2002-08-22 19:02:37 +0000 | [diff] [blame] | 241 | |
| 242 | self.check_wrap(self.text, 30, |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 243 | ['Did you say "supercalifragilis', |
| 244 | 'ticexpialidocious?" How *do*', |
| 245 | 'you spell that odd word,', |
| 246 | 'anyways?']) |
Greg Ward | fd030e4 | 2002-08-22 19:02:37 +0000 | [diff] [blame] | 247 | self.check_wrap(self.text, 50, |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 248 | ['Did you say "supercalifragilisticexpialidocious?"', |
| 249 | 'How *do* you spell that odd word, anyways?']) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 250 | |
| 251 | |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 252 | def test_nobreak_long(self): |
| 253 | # Test with break_long_words disabled |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 254 | self.wrapper.break_long_words = 0 |
| 255 | self.wrapper.width = 30 |
Greg Ward | ee41384 | 2002-08-22 18:55:38 +0000 | [diff] [blame] | 256 | expect = ['Did you say', |
| 257 | '"supercalifragilisticexpialidocious?"', |
| 258 | 'How *do* you spell that odd', |
| 259 | 'word, anyways?' |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 260 | ] |
Greg Ward | fd030e4 | 2002-08-22 19:02:37 +0000 | [diff] [blame] | 261 | result = self.wrapper.wrap(self.text) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 262 | self.check(result, expect) |
| 263 | |
| 264 | # Same thing with kwargs passed to standalone wrap() function. |
Greg Ward | fd030e4 | 2002-08-22 19:02:37 +0000 | [diff] [blame] | 265 | result = wrap(self.text, width=30, break_long_words=0) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 266 | self.check(result, expect) |
| 267 | |
| 268 | |
| 269 | |
Greg Ward | 13c53c6 | 2002-08-22 18:57:26 +0000 | [diff] [blame] | 270 | class IndentTestCases(BaseTestCase): |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 271 | |
| 272 | # called before each test method |
| 273 | def setUp(self): |
Greg Ward | f69d3c9 | 2002-08-22 19:06:45 +0000 | [diff] [blame] | 274 | self.text = '''\ |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 275 | This paragraph will be filled, first without any indentation, |
| 276 | and then with some (including a hanging indent).''' |
| 277 | |
| 278 | |
Greg Ward | f676578 | 2002-08-22 18:35:49 +0000 | [diff] [blame] | 279 | def test_fill(self): |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 280 | # Test the fill() method |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 281 | |
| 282 | expect = '''\ |
| 283 | This paragraph will be filled, first |
| 284 | without any indentation, and then with |
| 285 | some (including a hanging indent).''' |
| 286 | |
Greg Ward | f69d3c9 | 2002-08-22 19:06:45 +0000 | [diff] [blame] | 287 | result = fill(self.text, 40) |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 288 | self.check(result, expect) |
| 289 | |
| 290 | |
Greg Ward | f676578 | 2002-08-22 18:35:49 +0000 | [diff] [blame] | 291 | def test_initial_indent(self): |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 292 | # Test initial_indent parameter |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 293 | |
Greg Ward | f69d3c9 | 2002-08-22 19:06:45 +0000 | [diff] [blame] | 294 | expect = [" This paragraph will be filled,", |
| 295 | "first without any indentation, and then", |
| 296 | "with some (including a hanging indent)."] |
| 297 | result = wrap(self.text, 40, initial_indent=" ") |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 298 | self.check(result, expect) |
| 299 | |
Greg Ward | f69d3c9 | 2002-08-22 19:06:45 +0000 | [diff] [blame] | 300 | expect = "\n".join(expect) |
| 301 | result = fill(self.text, 40, initial_indent=" ") |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 302 | self.check(result, expect) |
| 303 | |
| 304 | |
Greg Ward | f676578 | 2002-08-22 18:35:49 +0000 | [diff] [blame] | 305 | def test_subsequent_indent(self): |
Guido van Rossum | 327af77 | 2002-08-22 20:13:47 +0000 | [diff] [blame] | 306 | # Test subsequent_indent parameter |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 307 | |
| 308 | expect = '''\ |
| 309 | * This paragraph will be filled, first |
| 310 | without any indentation, and then |
| 311 | with some (including a hanging |
| 312 | indent).''' |
| 313 | |
Greg Ward | f69d3c9 | 2002-08-22 19:06:45 +0000 | [diff] [blame] | 314 | result = fill(self.text, 40, |
| 315 | initial_indent=" * ", subsequent_indent=" ") |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 316 | self.check(result, expect) |
| 317 | |
| 318 | |
Greg Ward | f676578 | 2002-08-22 18:35:49 +0000 | [diff] [blame] | 319 | def test_main(): |
| 320 | suite = unittest.TestSuite() |
| 321 | suite.addTest(unittest.makeSuite(WrapTestCase)) |
Greg Ward | fd030e4 | 2002-08-22 19:02:37 +0000 | [diff] [blame] | 322 | suite.addTest(unittest.makeSuite(LongWordTestCase)) |
Greg Ward | f676578 | 2002-08-22 18:35:49 +0000 | [diff] [blame] | 323 | suite.addTest(unittest.makeSuite(IndentTestCases)) |
| 324 | test_support.run_suite(suite) |
| 325 | |
Greg Ward | 90c0b07 | 2002-08-22 18:11:10 +0000 | [diff] [blame] | 326 | if __name__ == '__main__': |
Greg Ward | f676578 | 2002-08-22 18:35:49 +0000 | [diff] [blame] | 327 | test_main() |