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

Method test_font

Lib/idlelib/idle_test/test_sidebar.py:340–361  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

338 self.assertNotEqual(self.linenumber.sidebar_text.index('@0,0'), '11.0')
339
340 def test_font(self):
341 ln = self.linenumber
342
343 orig_font = ln.sidebar_text['font']
344 test_font = 'TkTextFont'
345 self.assertNotEqual(orig_font, test_font)
346
347 # Ensure line numbers aren't shown.
348 ln.hide_sidebar()
349
350 self.font_override = test_font
351 # Nothing breaks when line numbers aren't shown.
352 ln.update_font()
353
354 # Activate line numbers, previous font change is immediately effective.
355 ln.show_sidebar()
356 self.assertEqual(ln.sidebar_text['font'], test_font)
357
358 # Call the font update with line numbers shown, change is picked up.
359 self.font_override = orig_font
360 ln.update_font()
361 self.assertEqual(ln.sidebar_text['font'], orig_font)
362
363 def test_highlight_colors(self):
364 ln = self.linenumber

Callers

nothing calls this directly

Calls 5

assertNotEqualMethod · 0.80
hide_sidebarMethod · 0.80
show_sidebarMethod · 0.80
update_fontMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected