summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/undo.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-07-10 21:28:10 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2016-07-10 21:28:10 (GMT)
commita748032653aec69596257f59f27d8e1945fece9d (patch)
tree25d06528db043b0e0039f5a1de73d60e304518cd /Lib/idlelib/undo.py
parentcd5e388c39563c7bd1122ec3360fd5ed60952668 (diff)
downloadcpython-a748032653aec69596257f59f27d8e1945fece9d.zip
cpython-a748032653aec69596257f59f27d8e1945fece9d.tar.gz
cpython-a748032653aec69596257f59f27d8e1945fece9d.tar.bz2
Refine geometry of idlelib htests (and a few other fix-ups).
Diffstat (limited to 'Lib/idlelib/undo.py')
-rw-r--r--Lib/idlelib/undo.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/idlelib/undo.py b/Lib/idlelib/undo.py
index ccc962a..9f291e5 100644
--- a/Lib/idlelib/undo.py
+++ b/Lib/idlelib/undo.py
@@ -338,13 +338,12 @@ class CommandSequence(Command):
def _undo_delegator(parent): # htest #
- import re
from tkinter import Toplevel, Text, Button
from idlelib.percolator import Percolator
undowin = Toplevel(parent)
undowin.title("Test UndoDelegator")
- width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
- undowin.geometry("+%d+%d"%(x, y + 175))
+ x, y = map(int, parent.geometry().split('+')[1:])
+ undowin.geometry("+%d+%d" % (x, y + 175))
text = Text(undowin, height=10)
text.pack()
@@ -362,7 +361,7 @@ def _undo_delegator(parent): # htest #
if __name__ == "__main__":
import unittest
- unittest.main('idlelib.idle_test.test_undo', verbosity=2,
- exit=False)
+ unittest.main('idlelib.idle_test.test_undo', verbosity=2, exit=False)
+
from idlelib.idle_test.htest import run
run(_undo_delegator)