except re.error as what:
args = what.args
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)
return None
return prog
root.geometry("+%d+%d"%(x, y + 150))
flist = PyShellFileList(root)
try: # to obtain a traceback object
- a
- except:
+ intentional_name_error
+ except NameError:
exc_type, exc_value, exc_tb = sys.exc_info()
# inject stack trace to sys
import unittest
import os
from test.test_support import requires
-from Tkinter import Tk, Text, TclError
+from Tkinter import Tk
from idlelib import textView as tv
from idlelib.idle_test.mock_idle import Func
from idlelib.idle_test.mock_tk import Mbox
self.assertIsNone(view)
if __name__ == '__main__':
- unittest.main(verbosity=2, exit=False)
- from idlelib.idle_test.htest import run
- run(TextViewer)
+ unittest.main(verbosity=2)