]> granicus.if.org Git - python/commitdiff
Get test to work when run from regrtest (add test_main), remove all CRs (^M)s
authorNeal Norwitz <nnorwitz@gmail.com>
Thu, 19 Feb 2004 02:37:29 +0000 (02:37 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Thu, 19 Feb 2004 02:37:29 +0000 (02:37 +0000)
Lib/test/test_tcl.py

index 3e0a781814d5db770953f3619289878ab00902ed..6cab2e85e1af9bd576e7318054e51356015e4d53 100644 (file)
@@ -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()