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

Method runcase

Lib/idlelib/idle_test/test_format.py:58–69  ·  view source on GitHub ↗
(self, inserttext, stopline, expected)

Source from the content-addressed store, hash-verified

56 cls.text = Text()
57
58 def runcase(self, inserttext, stopline, expected):
59 # Check that find_paragraph returns the expected paragraph when
60 # the mark index is set to beginning, middle, end of each line
61 # up to but not including the stop line
62 text = self.text
63 text.insert('1.0', inserttext)
64 for line in range(1, stopline):
65 linelength = int(text.index("%d.end" % line).split('.')[1])
66 for col in (0, linelength//2, linelength):
67 tempindex = "%d.%d" % (line, col)
68 self.assertEqual(ft.find_paragraph(text, tempindex), expected)
69 text.delete('1.0', 'end')
70
71 def test_find_comment(self):
72 comment = (

Callers 2

test_find_commentMethod · 0.95
test_find_paragraphMethod · 0.95

Calls 5

insertMethod · 0.45
splitMethod · 0.45
indexMethod · 0.45
assertEqualMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected