summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-06-22 22:09:48 (GMT)
committerGitHub <noreply@github.com>2022-06-22 22:09:48 (GMT)
commit576dd901170af30fc50b0a7f07a388b38fd724a9 (patch)
tree1768ea693124ccbb81b3ac4242c0f683e9e01256
parentdd39e29ccb5119343c9db57c14cc1dac49716e51 (diff)
downloadcpython-576dd901170af30fc50b0a7f07a388b38fd724a9.zip
cpython-576dd901170af30fc50b0a7f07a388b38fd724a9.tar.gz
cpython-576dd901170af30fc50b0a7f07a388b38fd724a9.tar.bz2
gh-84623: Remove unused imports in idlelib (#94143)
Remove commented code in test_debugger_r.py. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
-rw-r--r--Lib/idlelib/idle_test/test_debugger_r.py19
-rw-r--r--Lib/idlelib/idle_test/test_editor.py1
-rw-r--r--Lib/idlelib/iomenu.py4
3 files changed, 7 insertions, 17 deletions
diff --git a/Lib/idlelib/idle_test/test_debugger_r.py b/Lib/idlelib/idle_test/test_debugger_r.py
index 638ebd3..cf8af05 100644
--- a/Lib/idlelib/idle_test/test_debugger_r.py
+++ b/Lib/idlelib/idle_test/test_debugger_r.py
@@ -2,28 +2,21 @@
from idlelib import debugger_r
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
## def setUpClass(cls):
## requires('gui')
## cls.root = Tk()
-##
## @classmethod
## def tearDownClass(cls):
## cls.root.destroy()
-## del cls.root
-
- def test_init(self):
- self.assertTrue(True) # Get coverage of import
-
-# Classes GUIProxy, IdbAdapter, FrameProxy, CodeProxy, DictProxy,
-# GUIAdapter, IdbProxy plus 7 module functions.
+# GUIProxy, IdbAdapter, FrameProxy, CodeProxy, DictProxy,
+# GUIAdapter, IdbProxy, and 7 functions still need tests.
class IdbAdapterTest(unittest.TestCase):
diff --git a/Lib/idlelib/idle_test/test_editor.py b/Lib/idlelib/idle_test/test_editor.py
index 8665d68..fdb47ab 100644
--- a/Lib/idlelib/idle_test/test_editor.py
+++ b/Lib/idlelib/idle_test/test_editor.py
@@ -5,7 +5,6 @@ import unittest
from collections import namedtuple
from test.support import requires
from tkinter import Tk
-from idlelib.idle_test.mock_idle import Func
Editor = editor.EditorWindow
diff --git a/Lib/idlelib/iomenu.py b/Lib/idlelib/iomenu.py
index ad3109d..86ce68c 100644
--- a/Lib/idlelib/iomenu.py
+++ b/Lib/idlelib/iomenu.py
@@ -9,7 +9,6 @@ from tkinter import filedialog
from tkinter import messagebox
from tkinter.simpledialog import askstring
-import idlelib
from idlelib.config import idleConf
from idlelib.util import py_extensions
@@ -21,8 +20,7 @@ if sys.platform == 'win32':
else:
errors = 'surrogateescape'
-
-
+
class IOBinding:
# One instance per editor Window so methods know which to save, close.
# Open returns focus to self.editwin if aborted.