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

Method test_reload

Lib/idlelib/idle_test/test_squeezer.py:282–297  ·  view source on GitHub ↗

Test the reload() class-method.

(self)

Source from the content-addressed store, hash-verified

280 ))
281
282 def test_reload(self):
283 """Test the reload() class-method."""
284 editwin = self.make_mock_editor_window(with_text_widget=True)
285 squeezer = self.make_squeezer_instance(editwin)
286
287 orig_auto_squeeze_min_lines = squeezer.auto_squeeze_min_lines
288
289 # Increase auto-squeeze-min-lines.
290 new_auto_squeeze_min_lines = orig_auto_squeeze_min_lines + 10
291 self.set_idleconf_option_with_cleanup(
292 'main', 'PyShell', 'auto-squeeze-min-lines',
293 str(new_auto_squeeze_min_lines))
294
295 Squeezer.reload()
296 self.assertEqual(squeezer.auto_squeeze_min_lines,
297 new_auto_squeeze_min_lines)
298
299 def test_reload_no_squeezer_instances(self):
300 """Test that Squeezer.reload() runs without any instances existing."""

Callers

nothing calls this directly

Calls 6

strFunction · 0.85
reloadMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected