当前位置: 首页>>代码示例>>Python>>正文


Python MakefileParser.test_algos方法代码示例

本文整理汇总了Python中processing.algs.otb.OTBTester.MakefileParser.test_algos方法的典型用法代码示例。如果您正苦于以下问题:Python MakefileParser.test_algos方法的具体用法?Python MakefileParser.test_algos怎么用?Python MakefileParser.test_algos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在processing.algs.otb.OTBTester.MakefileParser的用法示例。


在下文中一共展示了MakefileParser.test_algos方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_processing_mapping

# 需要导入模块: from processing.algs.otb.OTBTester import MakefileParser [as 别名]
# 或者: from processing.algs.otb.OTBTester.MakefileParser import test_algos [as 别名]
def test_processing_mapping():
    mkf = MakefileParser()
    the_tests = mkf.test_algos()
    clients = get_client_apps()

    already_tested = set()

    for t in the_tests:
        test_name = 'test_%s' % t
        if the_tests[t][0].split(" ")[0] in clients:
            skip = False
            if the_tests[t][1] is None:
                skip = True
            else:
                if the_tests[t][1] == "":
                    skip = True

            if not skip:
                runnable = the_tests[t][0].split(" ")[0]
                if runnable not in already_tested:
                    test = ut_generator(test_name, the_tests[t])
                    setattr(TestSequence, test_name, test)
                    already_tested.add(runnable)

    suite = unittest.TestLoader().loadTestsFromTestCase(TestSequence)
    unittest.TextTestRunner(verbosity=2).run(suite)
开发者ID:3liz,项目名称:Quantum-GIS,代码行数:28,代码来源:TestOTBAlgorithms.py

示例2: unfiltered_processing_mapping

# 需要导入模块: from processing.algs.otb.OTBTester import MakefileParser [as 别名]
# 或者: from processing.algs.otb.OTBTester.MakefileParser import test_algos [as 别名]
def unfiltered_processing_mapping():
    mkf = MakefileParser()
    the_tests = mkf.test_algos()
    for t in the_tests:
        test_name = 'test_std_%s' % t
        if the_tests[t][1] is None:
            skip = True
        else:
            if the_tests[t][1] == "":
                skip = True

        if not skip:
            test = ut_generator(test_name, the_tests[t])
            setattr(TestSequence, test_name, test)

    suite = unittest.TestLoader().loadTestsFromTestCase(TestSequence)
    unittest.TextTestRunner(verbosity=2).run(suite)
开发者ID:3liz,项目名称:Quantum-GIS,代码行数:19,代码来源:TestOTBAlgorithms.py

示例3: ut_generator

# 需要导入模块: from processing.algs.otb.OTBTester import MakefileParser [as 别名]
# 或者: from processing.algs.otb.OTBTester.MakefileParser import test_algos [as 别名]
        if the_tests[t][0].split(" ")[0] in clients:
            skip = False
            if the_tests[t][1] is None:
                skip = True
            else:
                if the_tests[t][1] == "":
                    skip = True

            if not skip:
                runnable = the_tests[t][0].split(" ")[0]
                if runnable not in already_tested:
                    test = ut_generator(test_name, the_tests[t])
                    setattr(TestSequence, test_name, test)
                    already_tested.add(runnable)

    suite = unittest.TestLoader().loadTestsFromTestCase(TestSequence)
    unittest.TextTestRunner(verbosity=2).run(suite)


def test_xml_generation():
    create_xml_descriptors()

if __name__ == '__main__':
    mkf = MakefileParser()
    the_tests = mkf.test_algos()
    for t in the_tests:
        test_name = 'test_%s' % t
        test = ut_generator(test_name, the_tests[t])
        setattr(TestSequence, test_name, test)
    unittest.main()
开发者ID:3liz,项目名称:Quantum-GIS,代码行数:32,代码来源:TestOTBAlgorithms.py


注:本文中的processing.algs.otb.OTBTester.MakefileParser.test_algos方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。