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

Method test_auto_squeeze

Lib/idlelib/idle_test/test_squeezer.py:195–205  ·  view source on GitHub ↗

Test that the auto-squeezing creates an ExpandingButton properly.

(self)

Source from the content-addressed store, hash-verified

193 self.assertEqual(len(squeezer.expandingbuttons), 1)
194
195 def test_auto_squeeze(self):
196 """Test that the auto-squeezing creates an ExpandingButton properly."""
197 editwin = self.make_mock_editor_window(with_text_widget=True)
198 text_widget = editwin.text
199 squeezer = self.make_squeezer_instance(editwin)
200 squeezer.auto_squeeze_min_lines = 5
201 squeezer.count_lines = Mock(return_value=6)
202
203 editwin.write('TEXT\n'*6, "stdout")
204 self.assertEqual(text_widget.get('1.0', 'end'), '\n')
205 self.assertEqual(len(squeezer.expandingbuttons), 1)
206
207 def test_squeeze_current_text(self):
208 """Test the squeeze_current_text method."""

Callers

nothing calls this directly

Calls 6

MockClass · 0.90
writeMethod · 0.45
assertEqualMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected