當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。