test_main(): Added this so the test can actually get run under the
regrtest framework. Keep the original standalone-unittest
scaffolding (i.e. suite() and __main__).
diff --git a/Lib/test/test_email_codecs.py b/Lib/test/test_email_codecs.py
index d0451d1..3a133e8 100644
--- a/Lib/test/test_email_codecs.py
+++ b/Lib/test/test_email_codecs.py
@@ -2,7 +2,7 @@
# email package unit tests for (optional) Asian codecs
import unittest
-from test_support import TestSkipped
+import test_support
from email.Charset import Charset
from email.Header import Header, decode_header
@@ -12,7 +12,7 @@
try:
unicode('foo', 'japanese.iso-2022-jp')
except LookupError:
- raise TestSkipped, 'Optional Japanese codecs not installed'
+ raise test_support.TestSkipped, 'Optional Japanese codecs not installed'
@@ -46,6 +46,10 @@
return suite
+def test_main():
+ test_support.run_unittest(TestEmailAsianCodecs)
+
+
if __name__ == '__main__':
unittest.main(defaultTest='suite')