'Returns a list of maildir mail uids, \'None\' if no valid uid'

@classmethod
def get_maildir_uids(cls, folder):

    assert (cls.testdir != None)
    mailfilepath = os.path.join(cls.testdir, 'mail', folder)
    assert os.path.isdir(mailfilepath)
    ret = []
    for (dirpath, dirs, files) in os.walk(mailfilepath):
        if (not dirpath.endswith(((os.path.sep + 'new'), (os.path.sep + 'cur')))):
            continue
        for file in files:
            m = cls.re_uidmatch.search(file)
            uid = (m.group(1) if m else None)
            ret.append(uid)
    return ret
