From: Neal Norwitz Date: Thu, 19 Feb 2004 02:37:29 +0000 (+0000) Subject: Get test to work when run from regrtest (add test_main), remove all CRs (^M)s X-Git-Tag: v2.4a1~801 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63dfece675929bc585b1a37fbb3274822c5a3647;p=thirdparty%2FPython%2Fcpython.git Get test to work when run from regrtest (add test_main), remove all CRs (^M)s --- diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index 3e0a781814d5..6cab2e85e1af 100644 --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -2,6 +2,7 @@ import unittest import os +from test import test_support from Tkinter import Tcl from _tkinter import TclError @@ -152,8 +153,9 @@ class TclTest(unittest.TestCase): finally: if old_display is not None: os.environ['DISPLAY'] = old_display - -if __name__ == "__main__": - unittest.main() +def test_main(): + test_support.run_unittest(TclTest) +if __name__ == "__main__": + test_main()