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

Method show

Lib/test/test_textwrap.py:19–27  ·  view source on GitHub ↗
(self, textin)

Source from the content-addressed store, hash-verified

17 '''Parent class with utility methods for textwrap tests.'''
18
19 def show(self, textin):
20 if isinstance(textin, list):
21 result = []
22 for i in range(len(textin)):
23 result.append(" %d: %r" % (i, textin[i]))
24 result = "\n".join(result) if result else " no lines"
25 elif isinstance(textin, str):
26 result = " %s\n" % repr(textin)
27 return result
28
29
30 def check(self, result, expect):

Callers 1

checkMethod · 0.95

Calls 2

appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected