mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
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__).
This commit is contained in:
parent
24fd0252c4
commit
c9ad32c5d1
2 changed files with 20 additions and 21 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue