summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2004-02-19 02:37:29 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2004-02-19 02:37:29 (GMT)
commit63dfece675929bc585b1a37fbb3274822c5a3647 (patch)
treeb0a9de79f4f91c6f624616975572561bd1841a50 /Lib/test
parente2b4b3202588e0ea87bbc6967c79339979f8d0f4 (diff)
downloadcpython-63dfece675929bc585b1a37fbb3274822c5a3647.zip
cpython-63dfece675929bc585b1a37fbb3274822c5a3647.tar.gz
cpython-63dfece675929bc585b1a37fbb3274822c5a3647.tar.bz2
Get test to work when run from regrtest (add test_main), remove all CRs (^M)s
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_tcl.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index 3e0a781..6cab2e8 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()