Issue #27107: Add exception classes to mailbox.__all__, by Jacek Kołodziej
This commit is contained in:
parent
1cd2772246
commit
ed84ab3335
|
@ -23,9 +23,10 @@ try:
|
|||
except ImportError:
|
||||
fcntl = None
|
||||
|
||||
__all__ = [ 'Mailbox', 'Maildir', 'mbox', 'MH', 'Babyl', 'MMDF',
|
||||
'Message', 'MaildirMessage', 'mboxMessage', 'MHMessage',
|
||||
'BabylMessage', 'MMDFMessage']
|
||||
__all__ = ['Mailbox', 'Maildir', 'mbox', 'MH', 'Babyl', 'MMDF',
|
||||
'Message', 'MaildirMessage', 'mboxMessage', 'MHMessage',
|
||||
'BabylMessage', 'MMDFMessage', 'Error', 'NoSuchMailboxError',
|
||||
'NotEmptyError', 'ExternalClashError', 'FormatError']
|
||||
|
||||
linesep = os.linesep.encode('ascii')
|
||||
|
||||
|
|
|
@ -2268,12 +2268,18 @@ Gregory K. Johnson
|
|||
""")
|
||||
|
||||
|
||||
class MiscTestCase(unittest.TestCase):
|
||||
def test__all__(self):
|
||||
blacklist = {"linesep"}
|
||||
support.check__all__(self, mailbox, blacklist=blacklist)
|
||||
|
||||
|
||||
def test_main():
|
||||
tests = (TestMailboxSuperclass, TestMaildir, TestMbox, TestMMDF, TestMH,
|
||||
TestBabyl, TestMessage, TestMaildirMessage, TestMboxMessage,
|
||||
TestMHMessage, TestBabylMessage, TestMMDFMessage,
|
||||
TestMessageConversion, TestProxyFile, TestPartialFile,
|
||||
MaildirTestCase, TestFakeMailBox)
|
||||
MaildirTestCase, TestFakeMailBox, MiscTestCase)
|
||||
support.run_unittest(*tests)
|
||||
support.reap_children()
|
||||
|
||||
|
|
Loading…
Reference in New Issue