DRAFT = r'\Draft'
RECENT = r'\Recent' # This flag is read-only
-class IMAPClient:
+class IMAPClient(object):
'''
A Pythonic, easy-to-use IMAP client class.
def do_default(self, arg):
return arg
+
class FetchTokeniser(object):
'''
General response tokenizer and converter
else:
return s
+
class Literal(object):
'''
Simple class to represent a literal token in the fetch response
def __str__(self):
return '{%d}' % self.length
+
def strict_finditer(regex, s):
'''Like re.finditer except the regex must match from exactly where the
previous match ended and all the entire input must be matched.
else:
return
+
def messages_to_str(messages):
'''Convert a sequence of messages ids or a single message id into an
message ID list for use with IMAP commands.
raise ValueError('invalid message list: %r' % messages)
return ','.join([str(m) for m in messages])
+
def seq_to_parenlist(flags):
'''Convert a sequence into parenthised list for use with IMAP commands
--- /dev/null
+import unittest
+from imapclient.test.testable_imapclient import TestableIMAPClient
+
+class IMAPClientTestBase(unittest.TestCase):
+
+
+class TestMailBoxListing(unittest.TestCase):
+
+ d
+