ngamsTest.py 文件源码

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

项目:ngas 作者: ICRAR 项目源码 文件源码
def getTestList():
    """
    Generate a list containing the names of the test modules, which should
    be executed.

    Returns:   List with names of test Python modules (list/string).
    """
    testModList = []
    modulesInNgamsTest = pkg_resources.resource_listdir(__name__, ".")
    fileList = [f for f in modulesInNgamsTest if f.endswith("Test.py")]
    fileList.sort()
    supprTests = []
    for file in fileList:
        testMod = os.path.basename(file).split(".")[0]
        try:
            supprTests.index(testMod)
            print "===> NOTE: Test Suite: %-32s disabled - RE-ENABLE!" %\
                  testMod
            continue
        except:
            pass
        if (file.find("ngamsTest.py") == -1): testModList.append(testMod)
    return testModList
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号