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

Method test_metrics

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

Source from the content-addressed store, hash-verified

85 self.assertIsInstance(self.font.measure('abc'), int)
86
87 def test_metrics(self):
88 metrics = self.font.metrics()
89 self.assertGreaterEqual(set(metrics),
90 {'ascent', 'descent', 'linespace', 'fixed'})
91 for key in metrics:
92 self.assertEqual(self.font.metrics(key), metrics[key])
93 self.assertIsInstance(metrics[key], int)
94 self.assertIsInstance(self.font.metrics(key), int)
95
96 def test_families(self):
97 families = font.families(self.root)

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected