Commit 228b99e8 authored by Terry Jan Reedy's avatar Terry Jan Reedy

More idlelib cleanup inspired by pyflakes.

parent 9bc50561
...@@ -85,7 +85,7 @@ class SearchEngine: ...@@ -85,7 +85,7 @@ class SearchEngine:
except re.error as what: except re.error as what:
args = what.args args = what.args
msg = args[0] msg = args[0]
col = arg[1] if len(args) >= 2 else -1 col = args[1] if len(args) >= 2 else -1
self.report_error(pat, msg, col) self.report_error(pat, msg, col)
return None return None
return prog return prog
......
...@@ -131,8 +131,8 @@ def _stack_viewer(parent): ...@@ -131,8 +131,8 @@ def _stack_viewer(parent):
root.geometry("+%d+%d"%(x, y + 150)) root.geometry("+%d+%d"%(x, y + 150))
flist = PyShellFileList(root) flist = PyShellFileList(root)
try: # to obtain a traceback object try: # to obtain a traceback object
a intentional_name_error
except: except NameError:
exc_type, exc_value, exc_tb = sys.exc_info() exc_type, exc_value, exc_tb = sys.exc_info()
# inject stack trace to sys # inject stack trace to sys
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
import unittest import unittest
import os import os
from test.test_support import requires from test.test_support import requires
from Tkinter import Tk, Text, TclError from Tkinter import Tk
from idlelib import textView as tv from idlelib import textView as tv
from idlelib.idle_test.mock_idle import Func from idlelib.idle_test.mock_idle import Func
from idlelib.idle_test.mock_tk import Mbox from idlelib.idle_test.mock_tk import Mbox
...@@ -93,6 +93,4 @@ class textviewTest(unittest.TestCase): ...@@ -93,6 +93,4 @@ class textviewTest(unittest.TestCase):
self.assertIsNone(view) self.assertIsNone(view)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main(verbosity=2, exit=False) unittest.main(verbosity=2)
from idlelib.idle_test.htest import run
run(TextViewer)
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