summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test
diff options
context:
space:
mode:
authorAnatoliy Platonov <31926941+p4m-dev@users.noreply.github.com>2020-10-14 10:02:51 (GMT)
committerGitHub <noreply@github.com>2020-10-14 10:02:51 (GMT)
commitb4d895336a4692c95b4533adcc5c63a489e5e4e4 (patch)
tree0a9cd544bf4082d1db7a3d38c8f2c0f41f4a7ae3 /Lib/tkinter/test
parent0cafcd3c56c9475913d8d4fd0223c297dbb70ac6 (diff)
downloadcpython-b4d895336a4692c95b4533adcc5c63a489e5e4e4.zip
cpython-b4d895336a4692c95b4533adcc5c63a489e5e4e4.tar.gz
cpython-b4d895336a4692c95b4533adcc5c63a489e5e4e4.tar.bz2
bpo-41876: Overload __repr__ for tkinter Font objects (GH-22450)
Diffstat (limited to 'Lib/tkinter/test')
-rw-r--r--Lib/tkinter/test/test_tkinter/test_font.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_font.py b/Lib/tkinter/test/test_tkinter/test_font.py
index a021ea3..6d1eea4 100644
--- a/Lib/tkinter/test/test_tkinter/test_font.py
+++ b/Lib/tkinter/test/test_tkinter/test_font.py
@@ -101,6 +101,12 @@ class FontTest(AbstractTkTest, unittest.TestCase):
self.assertTrue(name)
self.assertIn(fontname, names)
+ def test_repr(self):
+ self.assertEqual(
+ repr(self.font), f'<tkinter.font.Font object {fontname!r}>'
+ )
+
+
tests_gui = (FontTest, )
if __name__ == "__main__":