diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-03-09 08:33:51 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-03-09 08:33:51 (GMT) |
commit | 42a4366ad51e7a470e59d5694e75e194f18042f3 (patch) | |
tree | 8b84cfaab9cb7ae70f8601f39ecf7123945c76a4 /Lib/tkinter/test/test_tkinter/test_widgets.py | |
parent | 0554d83f0ff7e9da5c021b57820b26a330c09129 (diff) | |
download | cpython-42a4366ad51e7a470e59d5694e75e194f18042f3.zip cpython-42a4366ad51e7a470e59d5694e75e194f18042f3.tar.gz cpython-42a4366ad51e7a470e59d5694e75e194f18042f3.tar.bz2 |
Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.
Added few missed tests for configure options.
Diffstat (limited to 'Lib/tkinter/test/test_tkinter/test_widgets.py')
-rw-r--r-- | Lib/tkinter/test/test_tkinter/test_widgets.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py index 7171667..c924d55 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/tkinter/test/test_tkinter/test_widgets.py @@ -102,7 +102,7 @@ class FrameTest(AbstractToplevelTest, unittest.TestCase): 'background', 'borderwidth', 'class', 'colormap', 'container', 'cursor', 'height', 'highlightbackground', 'highlightcolor', 'highlightthickness', - 'relief', 'takefocus', 'visual', 'width', + 'padx', 'pady', 'relief', 'takefocus', 'visual', 'width', ) def create(self, **kwargs): @@ -636,7 +636,7 @@ class CanvasTest(AbstractWidgetTest, unittest.TestCase): 'highlightbackground', 'highlightcolor', 'highlightthickness', 'insertbackground', 'insertborderwidth', 'insertofftime', 'insertontime', 'insertwidth', - 'relief', 'scrollregion', + 'offset', 'relief', 'scrollregion', 'selectbackground', 'selectborderwidth', 'selectforeground', 'state', 'takefocus', 'xscrollcommand', 'xscrollincrement', @@ -658,6 +658,15 @@ class CanvasTest(AbstractWidgetTest, unittest.TestCase): widget = self.create() self.checkBooleanParam(widget, 'confine') + def test_offset(self): + widget = self.create() + self.assertEqual(widget['offset'], '0,0') + self.checkParams(widget, 'offset', + 'n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw', 'center') + self.checkParam(widget, 'offset', '10,20') + self.checkParam(widget, 'offset', '#5,6') + self.checkInvalidParam(widget, 'offset', 'spam') + def test_scrollregion(self): widget = self.create() self.checkParam(widget, 'scrollregion', '0 0 200 150') |