bpo-41876: Overload __repr__ for tkinter Font objects (GH-22450)

This commit is contained in:
Anatoliy Platonov 2020-10-14 13:02:51 +03:00 committed by GitHub
parent 0cafcd3c56
commit b4d895336a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 0 deletions

View file

@ -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__":