diff options
Diffstat (limited to 'Lib/tkinter/test')
-rw-r--r-- | Lib/tkinter/test/test_tkinter/test_misc.py | 5 | ||||
-rw-r--r-- | Lib/tkinter/test/test_tkinter/test_widgets.py | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_misc.py b/Lib/tkinter/test/test_tkinter/test_misc.py index d325b31..46f5170 100644 --- a/Lib/tkinter/test/test_tkinter/test_misc.py +++ b/Lib/tkinter/test/test_tkinter/test_misc.py @@ -10,6 +10,11 @@ class MiscTest(unittest.TestCase): def setUp(self): self.root = ttk.setup_master() + def test_repr(self): + t = tkinter.Toplevel(self.root, name='top') + f = tkinter.Frame(t, name='child') + self.assertEqual(repr(f), '<tkinter.Frame object .top.child>') + def test_tk_setPalette(self): root = self.root root.tk_setPalette('black') diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py index c902997..6e3836f 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/tkinter/test/test_tkinter/test_widgets.py @@ -920,8 +920,9 @@ class ScrollbarTest(AbstractWidgetTest, unittest.TestCase): sb = self.create() for e in ('arrow1', 'slider', 'arrow2'): sb.activate(e) + self.assertEqual(sb.activate(), e) sb.activate('') - self.assertRaises(TypeError, sb.activate) + self.assertIsNone(sb.activate()) self.assertRaises(TypeError, sb.activate, 'arrow1', 'arrow2') def test_set(self): @@ -931,8 +932,8 @@ class ScrollbarTest(AbstractWidgetTest, unittest.TestCase): self.assertRaises(TclError, sb.set, 'abc', 'def') self.assertRaises(TclError, sb.set, 0.6, 'def') self.assertRaises(TclError, sb.set, 0.6, None) - self.assertRaises(TclError, sb.set, 0.6) - self.assertRaises(TclError, sb.set, 0.6, 0.7, 0.8) + self.assertRaises(TypeError, sb.set, 0.6) + self.assertRaises(TypeError, sb.set, 0.6, 0.7, 0.8) @add_standard_options(StandardOptionsTests) |