]> granicus.if.org Git - python/commitdiff
Restore the previous geometry before leaving the test
authorGuilherme Polo <ggpolo@gmail.com>
Mon, 2 Feb 2009 20:23:29 +0000 (20:23 +0000)
committerGuilherme Polo <ggpolo@gmail.com>
Mon, 2 Feb 2009 20:23:29 +0000 (20:23 +0000)
Lib/lib-tk/test/test_ttk/test_extensions.py

index 5a73a6f5de7e9d73a7afebdd1a22c13d5bf0be1c..413d2255d2b5ed0c87ad363e261ba76c19eb402b 100644 (file)
@@ -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()