diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-07-10 17:28:10 -0400 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-07-10 17:28:10 -0400 |
commit | 5ebfdc9de3428a14a008c8508eebe74c12afca63 (patch) | |
tree | e4f0af3611117060238ac0cde163c5582c3de217 /Lib/idlelib/undo.py | |
parent | 67c0294641100ab504d02f257183eb4e4f39922e (diff) | |
download | cpython-5ebfdc9de3428a14a008c8508eebe74c12afca63.tar.gz |
Refine geometry of idlelib htests (and a few other fix-ups).
Diffstat (limited to 'Lib/idlelib/undo.py')
-rw-r--r-- | Lib/idlelib/undo.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/idlelib/undo.py b/Lib/idlelib/undo.py index ccc962a122..9f291e599b 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) |