Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b3bfc3d

Browse files
committed
Issue #9899: Fix test_tkinter.test_font on various platforms. Patch by
Ned Deily.
1 parent 52d4250 commit b3bfc3d

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

Lib/tkinter/test/test_tkinter/test_font.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22
import tkinter
33
from tkinter import font
44
from test.support import requires, run_unittest
5+
import tkinter.test.support as support
56

67
requires('gui')
78

89
class FontTest(unittest.TestCase):
10+
11+
def setUp(self):
12+
support.root_deiconify()
13+
14+
def tearDown(self):
15+
support.root_withdraw()
16+
917
def test_font_eq(self):
10-
font1 = font.nametofont("system")
11-
font2 = font.nametofont("system")
18+
font1 = font.nametofont("TkDefaultFont")
19+
font2 = font.nametofont("TkDefaultFont")
1220
self.assertIsNot(font1, font2)
1321
self.assertEqual(font1, font2)
1422
self.assertNotEqual(font1, font1.copy())

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ Tools/Demos
207207
Tests
208208
-----
209209

210+
- Issue #9899: Fix test_tkinter.test_font on various platforms. Patch by
211+
Ned Deily.
212+
210213
- Issue #9894: Do not hardcode ENOENT in test_subprocess.
211214

212215
- Issue #9315: Added tests for the trace module. Patch by Eli Bendersky.

0 commit comments

Comments
 (0)