diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-03-09 08:52:08 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-03-09 08:52:08 (GMT) |
commit | 2d68f18656b451302739231393c7e7c282a23c98 (patch) | |
tree | d74038e6a300677794778f0cb459139ac24c0c01 /Lib/tkinter/test/test_tkinter | |
parent | b9f3114d42601b07c9830af8b18330bff475bcfc (diff) | |
parent | 42a4366ad51e7a470e59d5694e75e194f18042f3 (diff) | |
download | cpython-2d68f18656b451302739231393c7e7c282a23c98.zip cpython-2d68f18656b451302739231393c7e7c282a23c98.tar.gz cpython-2d68f18656b451302739231393c7e7c282a23c98.tar.bz2 |
Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.
Diffstat (limited to 'Lib/tkinter/test/test_tkinter')
-rw-r--r-- | Lib/tkinter/test/test_tkinter/test_geometry_managers.py | 6 | ||||
-rw-r--r-- | Lib/tkinter/test/test_tkinter/test_widgets.py | 13 |
2 files changed, 17 insertions, 2 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_geometry_managers.py b/Lib/tkinter/test/test_tkinter/test_geometry_managers.py index e42b1be..c645d43 100644 --- a/Lib/tkinter/test/test_tkinter/test_geometry_managers.py +++ b/Lib/tkinter/test/test_tkinter/test_geometry_managers.py @@ -12,6 +12,8 @@ requires('gui') class PackTest(AbstractWidgetTest, unittest.TestCase): + test_keys = None + def create2(self): pack = tkinter.Toplevel(self.root, name='pack') pack.wm_geometry('300x200+0+0') @@ -276,6 +278,8 @@ class PackTest(AbstractWidgetTest, unittest.TestCase): class PlaceTest(AbstractWidgetTest, unittest.TestCase): + test_keys = None + def create2(self): t = tkinter.Toplevel(self.root, width=300, height=200, bd=0) t.wm_geometry('300x200+0+0') @@ -478,6 +482,8 @@ class PlaceTest(AbstractWidgetTest, unittest.TestCase): class GridTest(AbstractWidgetTest, unittest.TestCase): + test_keys = None + def tearDown(self): cols, rows = self.root.grid_size() for i in range(cols + 1): diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py index 5a01a5a..81b52ea 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/tkinter/test/test_tkinter/test_widgets.py @@ -103,7 +103,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): @@ -637,7 +637,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', @@ -659,6 +659,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') |