gh-84623: Remove unused imports in idlelib (GH-94143)

Remove commented code in test_debugger_r.py.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 576dd90117)

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Miss Islington (bot) 2022-06-22 15:36:47 -07:00 committed by GitHub
parent 5bca4bba98
commit a562d2dc8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 17 deletions

View file

@ -2,28 +2,21 @@
from idlelib import debugger_r from idlelib import debugger_r
import unittest import unittest
from test.support import requires
from tkinter import Tk
class Test(unittest.TestCase):
# Boilerplate likely to be needed for future test classes.
##from test.support import requires
##from tkinter import Tk
##class Test(unittest.TestCase):
## @classmethod ## @classmethod
## def setUpClass(cls): ## def setUpClass(cls):
## requires('gui') ## requires('gui')
## cls.root = Tk() ## cls.root = Tk()
##
## @classmethod ## @classmethod
## def tearDownClass(cls): ## def tearDownClass(cls):
## cls.root.destroy() ## cls.root.destroy()
## del cls.root
def test_init(self): # GUIProxy, IdbAdapter, FrameProxy, CodeProxy, DictProxy,
self.assertTrue(True) # Get coverage of import # GUIAdapter, IdbProxy, and 7 functions still need tests.
# Classes GUIProxy, IdbAdapter, FrameProxy, CodeProxy, DictProxy,
# GUIAdapter, IdbProxy plus 7 module functions.
class IdbAdapterTest(unittest.TestCase): class IdbAdapterTest(unittest.TestCase):

View file

@ -5,7 +5,6 @@ import unittest
from collections import namedtuple from collections import namedtuple
from test.support import requires from test.support import requires
from tkinter import Tk from tkinter import Tk
from idlelib.idle_test.mock_idle import Func
Editor = editor.EditorWindow Editor = editor.EditorWindow

View file

@ -9,7 +9,6 @@ from tkinter import filedialog
from tkinter import messagebox from tkinter import messagebox
from tkinter.simpledialog import askstring from tkinter.simpledialog import askstring
import idlelib
from idlelib.config import idleConf from idlelib.config import idleConf
from idlelib.util import py_extensions from idlelib.util import py_extensions
@ -21,8 +20,7 @@ if sys.platform == 'win32':
else: else:
errors = 'surrogateescape' errors = 'surrogateescape'
class IOBinding: class IOBinding:
# One instance per editor Window so methods know which to save, close. # One instance per editor Window so methods know which to save, close.
# Open returns focus to self.editwin if aborted. # Open returns focus to self.editwin if aborted.