mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue #19602: Use specific asserts in tkinter tests.
This commit is contained in:
parent
78ee078405
commit
e3b5a76540
3 changed files with 26 additions and 26 deletions
|
@ -18,7 +18,7 @@ class StyleTest(unittest.TestCase):
|
|||
style.configure('TButton', background='yellow')
|
||||
self.assertEqual(style.configure('TButton', 'background'),
|
||||
'yellow')
|
||||
self.assertTrue(isinstance(style.configure('TButton'), dict))
|
||||
self.assertIsInstance(style.configure('TButton'), dict)
|
||||
|
||||
|
||||
def test_map(self):
|
||||
|
@ -26,7 +26,7 @@ class StyleTest(unittest.TestCase):
|
|||
style.map('TButton', background=[('active', 'background', 'blue')])
|
||||
self.assertEqual(style.map('TButton', 'background'),
|
||||
[('active', 'background', 'blue')])
|
||||
self.assertTrue(isinstance(style.map('TButton'), dict))
|
||||
self.assertIsInstance(style.map('TButton'), dict)
|
||||
|
||||
|
||||
def test_lookup(self):
|
||||
|
@ -57,7 +57,7 @@ class StyleTest(unittest.TestCase):
|
|||
self.assertEqual(style.layout('Treeview'), tv_style)
|
||||
|
||||
# should return a list
|
||||
self.assertTrue(isinstance(style.layout('TButton'), list))
|
||||
self.assertIsInstance(style.layout('TButton'), list)
|
||||
|
||||
# correct layout, but "option" doesn't exist as option
|
||||
self.assertRaises(tkinter.TclError, style.layout, 'Treeview',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue