MCPcopy Index your code
hub / github.com/python/cpython / test_simple

Method test_simple

Lib/test/test_textwrap.py:51–66  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 1

check_wrapMethod · 0.80

Tested by

no test coverage detected