diff options
author | Barry Warsaw <barry@python.org> | 2002-04-15 22:14:06 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2002-04-15 22:14:06 (GMT) |
commit | c9ad32c5d14f0ebd635e61b33b6d7d5a12440c1e (patch) | |
tree | a27b610ec09cb1fb2377d606e545f1682a4a7603 /Lib/test/test_email_codecs.py | |
parent | 24fd0252c474bb1e4189dd6b92e572343f27f0f9 (diff) | |
download | cpython-c9ad32c5d14f0ebd635e61b33b6d7d5a12440c1e.zip cpython-c9ad32c5d14f0ebd635e61b33b6d7d5a12440c1e.tar.gz cpython-c9ad32c5d14f0ebd635e61b33b6d7d5a12440c1e.tar.bz2 |
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__).
Diffstat (limited to 'Lib/test/test_email_codecs.py')
-rw-r--r-- | Lib/test/test_email_codecs.py | 8 |
1 files changed, 6 insertions, 2 deletions
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 @@ from email.Header import Header, decode_header 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 @@ def suite(): return suite +def test_main(): + test_support.run_unittest(TestEmailAsianCodecs) + + if __name__ == '__main__': unittest.main(defaultTest='suite') |