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

Method test_find_paragraph

Lib/idlelib/idle_test/test_format.py:125–159  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

123 self.runcase(comment, 3, ('2.0', '3.0', '#', comment[1:49]))
124
125 def test_find_paragraph(self):
126 teststring = (
127 '"""String with no blank lines before\n'
128 'String line\n'
129 '"""\n'
130 '\n')
131 self.runcase(teststring, 4, ('1.0', '4.0', '', teststring[0:53]))
132
133 teststring = (
134 "\n"
135 '"""String with whitespace line before and after\n'
136 'String line.\n'
137 '"""\n'
138 '\n')
139 self.runcase(teststring, 5, ('2.0', '5.0', '', teststring[1:66]))
140
141 teststring = (
142 '\n'
143 ' """Indented string with whitespace before and after\n'
144 ' Comment string.\n'
145 ' """\n'
146 '\n')
147 self.runcase(teststring, 5, ('2.0', '5.0', ' ', teststring[1:85]))
148
149 teststring = (
150 '\n'
151 '"""Single line string."""\n'
152 '\n')
153 self.runcase(teststring, 3, ('2.0', '3.0', '', teststring[1:27]))
154
155 teststring = (
156 '\n'
157 ' """Single line string with leading whitespace."""\n'
158 '\n')
159 self.runcase(teststring, 3, ('2.0', '3.0', ' ', teststring[1:55]))
160
161
162class ReformatFunctionTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 1

runcaseMethod · 0.95

Tested by

no test coverage detected