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

Method test_placeholder

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

Source from the content-addressed store, hash-verified

1093 "I'm glad to [...]")
1094
1095 def test_placeholder(self):
1096 text = "Hello there, how are you this fine day? I'm glad to hear it!"
1097
1098 self.check_shorten(text, 17, "Hello there,$$", placeholder='$$')
1099 self.check_shorten(text, 18, "Hello there, how$$", placeholder='$$')
1100 self.check_shorten(text, 18, "Hello there, $$", placeholder=' $$')
1101 self.check_shorten(text, len(text), text, placeholder='$$')
1102 self.check_shorten(text, len(text) - 1,
1103 "Hello there, how are you this fine day? "
1104 "I'm glad to hear$$", placeholder='$$')
1105
1106 def test_empty_string(self):
1107 self.check_shorten("", 6, "")

Callers

nothing calls this directly

Calls 1

check_shortenMethod · 0.95

Tested by

no test coverage detected