(self)
| 49 | self.wrapper = TextWrapper(width=45) |
| 50 | |
| 51 | def test_simple(self): |
| 52 | # Simple case: just words, spaces, and a bit of punctuation |
| 53 | |
| 54 | text = "Hello there, how are you this fine day? I'm glad to hear it!" |
| 55 | |
| 56 | self.check_wrap(text, 12, |
| 57 | ["Hello there,", |
| 58 | "how are you", |
| 59 | "this fine", |
| 60 | "day? I'm", |
| 61 | "glad to hear", |
| 62 | "it!"]) |
| 63 | self.check_wrap(text, 42, |
| 64 | ["Hello there, how are you this fine day?", |
| 65 | "I'm glad to hear it!"]) |
| 66 | self.check_wrap(text, 80, [text]) |
| 67 | |
| 68 | def test_empty_string(self): |
| 69 | # Check that wrapping the empty string returns an empty list. |
nothing calls this directly
no test coverage detected