mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Restore the previous geometry before leaving the test
This commit is contained in:
parent
fee1c7f4c9
commit
b64c989efc
1 changed files with 3 additions and 2 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue