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

Method test_actual

Lib/test/test_tkinter/test_font.py:50–62  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48 gc_collect()
49
50 def test_actual(self):
51 options = self.font.actual()
52 self.assertGreaterEqual(set(options),
53 {'family', 'size', 'weight', 'slant', 'underline', 'overstrike'})
54 for key in options:
55 self.assertEqual(self.font.actual(key), options[key])
56 for key in 'family', 'weight', 'slant':
57 self.assertIsInstance(options[key], str)
58 self.assertIsInstance(self.font.actual(key), str)
59 sizetype = int if self.wantobjects else str
60 for key in 'size', 'underline', 'overstrike':
61 self.assertIsInstance(options[key], sizetype)
62 self.assertIsInstance(self.font.actual(key), sizetype)
63
64 def test_name(self):
65 self.assertEqual(self.font.name, fontname)

Callers

nothing calls this directly

Calls 5

setFunction · 0.85
actualMethod · 0.80
assertGreaterEqualMethod · 0.80
assertIsInstanceMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected