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

Method test_found

Lib/idlelib/idle_test/test_grep.py:138–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

136 self.assertEqual(lines[1], 'No hits.')
137
138 def test_found(self):
139
140 pat = '""" !Changing this line will break Test_findfile.test_found!'
141 lines = self.report(pat)
142 self.assertEqual(len(lines), 5)
143 self.assertIn(pat, lines[0])
144 self.assertIn('py: 1:', lines[1]) # line number 1
145 self.assertIn('2', lines[3]) # hits found 2
146 self.assertStartsWith(lines[4], '(Hint:')
147
148
149class Default_commandTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 4

reportMethod · 0.95
assertInMethod · 0.80
assertStartsWithMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected