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

Method test_get_font

Lib/idlelib/idle_test/test_config.py:554–571  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

552 conf.GetExtraHelpSourceList('default') + conf.GetExtraHelpSourceList('user'))
553
554 def test_get_font(self):
555 from test.support import requires
556 from tkinter import Tk
557 from tkinter.font import Font
558 conf = self.mock_config()
559
560 requires('gui')
561 root = Tk()
562 root.withdraw()
563
564 f = Font.actual(Font(name='TkFixedFont', exists=True, root=root))
565 self.assertEqual(
566 conf.GetFont(root, 'main', 'EditorWindow'),
567 (f['family'], 10 if f['size'] <= 0 else f['size'], f['weight']))
568
569 # Cleanup root
570 root.destroy()
571 del root
572
573 def test_get_core_keys(self):
574 conf = self.mock_config()

Callers

nothing calls this directly

Calls 8

mock_configMethod · 0.95
destroyMethod · 0.95
requiresFunction · 0.90
TkClass · 0.90
FontClass · 0.90
actualMethod · 0.80
GetFontMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected