From: Georg Brandl Date: Fri, 28 Jul 2006 18:30:50 +0000 (+0000) Subject: Patch #1529686: run test_iterlen and test_email_codecs in 2.4. X-Git-Tag: v2.4.4c1~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e59967ef618cce772fe32447c0fb6c792211051;p=thirdparty%2FPython%2Fcpython.git Patch #1529686: run test_iterlen and test_email_codecs in 2.4. --- diff --git a/Lib/test/test_email_codecs.py b/Lib/test/test_email_codecs.py index aadd53738c34..b6a34569d851 100644 --- a/Lib/test/test_email_codecs.py +++ b/Lib/test/test_email_codecs.py @@ -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() diff --git a/Lib/test/test_iterlen.py b/Lib/test/test_iterlen.py index b51263d118ac..8c0c0e56d821 100644 --- a/Lib/test/test_iterlen.py +++ b/Lib/test/test_iterlen.py @@ -223,9 +223,7 @@ class TestSeqIterReversed(TestInvariantWithoutMutations): self.assertEqual(len(it), 0) - -if __name__ == "__main__": - +def test_main(): unittests = [ TestRepeat, TestXrange, @@ -243,3 +241,6 @@ if __name__ == "__main__": TestSeqIterReversed, ] test_support.run_unittest(*unittests) + +if __name__ == "__main__": + test_main() diff --git a/Misc/NEWS b/Misc/NEWS index 9531c610d063..e6b206963e23 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -153,6 +153,12 @@ Documentation - Bug #1337990: clarified that ``doctest`` does not support examples requiring both expected output and an exception. +Tests +----- + +- Patch #1529686: test_iterlen and test_email_codecs are now actually + run by regrtest.py. + What's New in Python 2.4.3? ===========================