Restore the previous geometry before leaving the test

This commit is contained in:
Guilherme Polo 2009-02-02 20:23:29 +00:00
parent fee1c7f4c9
commit b64c989efc
1 changed files with 3 additions and 2 deletions

View 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()