Kaydet (Commit) bbdc0655 authored tarafından Terry Jan Reedy's avatar Terry Jan Reedy

Issue #25507: move test-specific imports to test function (idlelib.IOBinding).

üst dcc13ef1
import codecs
from codecs import BOM_UTF8
import os
import re
import shlex
import sys
import codecs
import tempfile
import tkinter.filedialog as tkFileDialog
import tkinter.messagebox as tkMessageBox
import re
from tkinter import *
from tkinter.simpledialog import askstring
from idlelib.configHandler import idleConf
from codecs import BOM_UTF8
# Try setting the locale, so that we can find out
# what encoding to use
......@@ -525,7 +524,10 @@ class IOBinding:
self.editwin.update_recent_files_list(filename)
def _io_binding(parent): # htest #
root = Tk()
from tkinter import Toplevel, Text
from idlelib.configHandler import idleConf
root = Toplevel(parent)
root.title("Test IOBinding")
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
root.geometry("+%d+%d"%(x, y + 150))
......
......@@ -189,9 +189,11 @@ _grep_dialog_spec = {
_io_binding_spec = {
'file': 'IOBinding',
'kwds': {},
'msg': "Test the following bindings\n"
"<Control-o> to display open window from file dialog.\n"
"<Control-s> to save the file\n"
'msg': "Test the following bindings.\n"
"<Control-o> to open file from dialog.\n"
"Edit the file.\n"
"<Control-s> to save the file.\n"
"Check that changes were saved by opening the file elsewhere."
}
_multi_call_spec = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment