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

Method test_searcher

Lib/idlelib/idle_test/test_editor.py:198–211  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

196 del cls.root
197
198 def test_searcher(self):
199 text = self.text
200 searcher = (self.text)
201 test_info = (# text, (block, indent))
202 ("", (None, None)),
203 ("[1,", (None, None)), # TokenError
204 ("if 1:\n", ('if 1:\n', None)),
205 ("if 1:\n 2\n 3\n", ('if 1:\n', ' 2\n')),
206 )
207 for code, expected_pair in test_info:
208 with self.subTest(code=code):
209 insert(text, code)
210 actual_pair = editor.IndentSearcher(text).run()
211 self.assertEqual(actual_pair, expected_pair)
212
213
214class RMenuTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 4

insertFunction · 0.85
subTestMethod · 0.45
runMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected