summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorGuilherme Polo <ggpolo@gmail.com>2009-02-02 20:23:29 (GMT)
committerGuilherme Polo <ggpolo@gmail.com>2009-02-02 20:23:29 (GMT)
commitb64c989efc3c6e4885a17b9a1bad7ad7ac37744a (patch)
tree4f74b5ee05e65ce4da8c4c295d4d4968730dd24f /Lib/lib-tk
parentfee1c7f4c9f61ad870ebbf481ae8449ac680a1a7 (diff)
downloadcpython-b64c989efc3c6e4885a17b9a1bad7ad7ac37744a.zip
cpython-b64c989efc3c6e4885a17b9a1bad7ad7ac37744a.tar.gz
cpython-b64c989efc3c6e4885a17b9a1bad7ad7ac37744a.tar.bz2
Restore the previous geometry before leaving the test
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/test/test_ttk/test_extensions.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/lib-tk/test/test_ttk/test_extensions.py b/Lib/lib-tk/test/test_ttk/test_extensions.py
index 5a73a6f..413d225 100644
--- a/Lib/lib-tk/test/test_ttk/test_extensions.py
+++ b/Lib/lib-tk/test/test_ttk/test_extensions.py
@@ -167,14 +167,15 @@ class LabeledScaleTest(unittest.TestCase):
x.update()
width, height = x.master.winfo_width(), x.master.winfo_height()
- width, height = width * 2, height * 2
+ width_new, height_new = width * 2, height * 2
x.value = 3
x.update()
- x.master.wm_geometry("%dx%d" % (width, height))
+ x.master.wm_geometry("%dx%d" % (width_new, height_new))
self.failUnlessEqual(int(x.label.place_info()['x']),
x.scale.coords()[0])
+ # Reset geometry
x.master.wm_geometry("%dx%d" % (width, height))
x.destroy()