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

Method test_nametofont

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

Source from the content-addressed store, hash-verified

161 self.assertRaises(RuntimeError, font.names)
162
163 def test_nametofont(self):
164 self.assertRaises(RuntimeError, font.nametofont, fontname)
165 root = tkinter.Tk()
166 testfont = font.nametofont(fontname)
167 self.assertIsInstance(testfont, font.Font)
168 self.assertEqual(testfont.name, fontname)
169 root.destroy()
170 tkinter.NoDefaultRoot()
171 self.assertRaises(RuntimeError, font.nametofont, fontname)
172
173
174class TestModule(unittest.TestCase):

Callers

nothing calls this directly

Calls 4

destroyMethod · 0.95
assertIsInstanceMethod · 0.80
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected