Index: Lib/test/test_email_codecs.py =================================================================== --- Lib/test/test_email_codecs.py (revision 50905) +++ Lib/test/test_email_codecs.py (working copy) @@ -1,11 +1,12 @@ # Copyright (C) 2002 Python Software Foundation # email package unit tests for (optional) Asian codecs -import unittest # The specific tests now live in Lib/email/test -from email.test.test_email_codecs import suite +from email.test import test_email_codecs +from test import test_support +def test_main(): + test_support.run_suite(test_email_codecs.suite()) - if __name__ == '__main__': - unittest.main(defaultTest='suite') + test_main() Index: Lib/test/test_iterlen.py =================================================================== --- Lib/test/test_iterlen.py (revision 50905) +++ Lib/test/test_iterlen.py (working copy) @@ -223,9 +223,7 @@ self.assertEqual(len(it), 0) - -if __name__ == "__main__": - +def test_main(): unittests = [ TestRepeat, TestXrange, @@ -243,3 +241,6 @@ TestSeqIterReversed, ] test_support.run_unittest(*unittests) + +if __name__ == "__main__": + test_main()