__init__.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:deb-python-lesscpy 作者: openstack 项目源码 文件源码
def find():
    svn = re.compile('\.svn')
    test = re.compile('test.+\.py$')
    alltests = unittest.TestSuite()
    for path, _, files in os.walk(here):
        if svn.search(path):
            continue
        for f in files:
            if test.search(f):
                module = __import__(f.split('.')[0])
                alltests.addTest(unittest.findTestCases(module))
    return alltests
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号