Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eeed955 commit 2f92e78Copy full SHA for 2f92e78
1 file changed
Lib/tkinter/test/test_tkinter/test_font.py
@@ -15,8 +15,13 @@ def tearDown(self):
15
support.root_withdraw()
16
17
def test_font_eq(self):
18
- font1 = font.nametofont("TkDefaultFont")
19
- font2 = font.nametofont("TkDefaultFont")
+ fontname = "TkDefaultFont"
+ try:
20
+ f = font.Font(name=fontname, exists=True)
21
+ except tkinter._tkinter.TclError:
22
+ f = font.Font(name=fontname, exists=False)
23
+ font1 = font.nametofont(fontname)
24
+ font2 = font.nametofont(fontname)
25
self.assertIsNot(font1, font2)
26
self.assertEqual(font1, font2)
27
self.assertNotEqual(font1, font1.copy())
0 commit comments