Kaydet (Commit) 234480df authored tarafından Terry Jan Reedy's avatar Terry Jan Reedy

Merge with 3.5

...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import unittest import unittest
from test.test_email.test_email import TestEmailBase from test.test_email import TestEmailBase
from email.charset import Charset from email.charset import Charset
from email.header import Header, decode_header from email.header import Header, decode_header
from email.message import Message from email.message import Message
......
...@@ -10,10 +10,9 @@ import sys ...@@ -10,10 +10,9 @@ import sys
import os import os
import unittest import unittest
from io import StringIO from io import StringIO
from types import ListType
from email.test.test_email import TestEmailBase from test.test_email import TestEmailBase
from test.support import TestSkipped, run_unittest from test.support import run_unittest
import email import email
from email import __file__ as testfile from email import __file__ as testfile
...@@ -28,7 +27,7 @@ def openfile(filename): ...@@ -28,7 +27,7 @@ def openfile(filename):
try: try:
openfile('crispin-torture.txt') openfile('crispin-torture.txt')
except OSError: except OSError:
raise TestSkipped raise unittest.SkipTest
...@@ -50,7 +49,7 @@ class TestCrispinTorture(TortureBase): ...@@ -50,7 +49,7 @@ class TestCrispinTorture(TortureBase):
neq = self.ndiffAssertEqual neq = self.ndiffAssertEqual
msg = self._msgobj('crispin-torture.txt') msg = self._msgobj('crispin-torture.txt')
payload = msg.get_payload() payload = msg.get_payload()
eq(type(payload), ListType) eq(type(payload), list)
eq(len(payload), 12) eq(len(payload), 12)
eq(msg.preamble, None) eq(msg.preamble, None)
eq(msg.epilogue, '\n') eq(msg.epilogue, '\n')
...@@ -113,7 +112,6 @@ multipart/mixed ...@@ -113,7 +112,6 @@ multipart/mixed
audio/x-sun audio/x-sun
""") """)
def _testclasses(): def _testclasses():
mod = sys.modules[__name__] mod = sys.modules[__name__]
return [getattr(mod, name) for name in dir(mod) if name.startswith('Test')] return [getattr(mod, name) for name in dir(mod) if name.startswith('Test')]
...@@ -131,6 +129,5 @@ def test_main(): ...@@ -131,6 +129,5 @@ def test_main():
run_unittest(testclass) run_unittest(testclass)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main(defaultTest='suite') unittest.main(defaultTest='suite')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment