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


Python ChiefController._controller方法代码示例

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


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

示例1: TestCaseControllerWithSteps

# 需要导入模块: from robotide.controller import ChiefController [as 别名]
# 或者: from robotide.controller.ChiefController import _controller [as 别名]
def TestCaseControllerWithSteps(chief=None, source='some_suite.txt'):
    tcf = TestCaseFile()
    tcf.source = source
    tcf.setting_table.suite_setup.name = 'Suite Setup Kw'
    tcf.setting_table.test_setup.name = SUITE_TEST_SETUP_KEYWORD
    tcf.setting_table.test_teardown.name = 'Test Teardown Kw'
    tcf.setting_table.suite_teardown.name = 'Suite Teardown Kw'
    tcf.setting_table.test_template.value = SUITE_TEST_TEMPLATE_KEYWORD
    testcase = tcf.testcase_table.add(TEST1_NAME)
    for step in [[STEP1_KEYWORD, 'Hello'], ['Run Keyword', STEP2_ARGUMENT], [USERKEYWORD2_NAME]]:
        testcase.add_step(step)
    for_loop = testcase.add_for_loop([': FOR', '${i}', 'IN RANGE', '10'])
    for_loop.add_step(['Log', '${i}'])
    testcase.setup.name = SETUP_KEYWORD
    testcase.teardown.name = 'Teardown Kw'
    testcase.template.value = TEMPLATE_KEYWORD
    uk = tcf.keyword_table.add(USERKEYWORD1_NAME)
    uk.add_step([KEYWORD_IN_USERKEYWORD1])
    uk = tcf.keyword_table.add(USERKEYWORD2_NAME)
    uk.add_step(['No Operation'])
    if chief is None:
        chief = ChiefController(Namespace())
    tcf_ctrl = TestCaseFileController(tcf, chief)
    chief._controller = tcf_ctrl
    tctablectrl = TestCaseTableController(tcf_ctrl,
                                          tcf.testcase_table)
    return TestCaseController(tctablectrl, testcase), chief._namespace
开发者ID:IlfirinPL,项目名称:RIDE,代码行数:29,代码来源:test_occurrences.py

示例2: test_deleting_init_file

# 需要导入模块: from robotide.controller import ChiefController [as 别名]
# 或者: from robotide.controller.ChiefController import _controller [as 别名]
 def test_deleting_init_file(self):
     chief = ChiefController(Namespace())
     chief._controller = TestDataDirectoryController(TestDataDirectory(source=self._dirpath).populate(), chief)
     os.remove(self._init_path)
     chief.data.remove()
     open(self._init_path, 'w').write('*Settings*\nDocumentation  Ride unit testing file\n')
     assert_true(chief.data.has_format() is False, chief.data.data.initfile)
开发者ID:IlfirinPL,项目名称:RIDE,代码行数:9,代码来源:test_modifcations_on_disk.py

示例3: test_deleting_source_should_remove_it_from_model

# 需要导入模块: from robotide.controller import ChiefController [as 别名]
# 或者: from robotide.controller.ChiefController import _controller [as 别名]
 def test_deleting_source_should_remove_it_from_model(self):
     chief = ChiefController(Namespace())
     chief._controller = TestCaseFileController(TestCaseFile(source=self._filepath), chief)
     os.remove(self._filepath)
     ctrl = chief.data
     ctrl.remove()
     assert_true(chief.data is None)
     assert_true(self._removed_datafile is ctrl)
开发者ID:IlfirinPL,项目名称:RIDE,代码行数:10,代码来源:test_modifcations_on_disk.py

示例4: TestCaseControllerWithSteps

# 需要导入模块: from robotide.controller import ChiefController [as 别名]
# 或者: from robotide.controller.ChiefController import _controller [as 别名]
def TestCaseControllerWithSteps(chief=None, source="some_suite.txt"):
    tcf = TestCaseFile()
    tcf.source = source
    tcf.setting_table.suite_setup.name = "Suite Setup Kw"
    tcf.setting_table.test_setup.name = SUITE_TEST_SETUP_KEYWORD
    tcf.setting_table.test_teardown.name = "Test Teardown Kw"
    tcf.setting_table.suite_teardown.name = "Suite Teardown Kw"
    tcf.setting_table.test_template.value = SUITE_TEST_TEMPLATE_KEYWORD
    testcase = _create_testcase(tcf)
    uk = tcf.keyword_table.add(USERKEYWORD1_NAME)
    uk.add_step([KEYWORD_IN_USERKEYWORD1])
    uk = tcf.keyword_table.add(USERKEYWORD2_NAME)
    uk.add_step(["No Operation"])
    uk = tcf.keyword_table.add(EMBEDDED_ARGUMENTS_KEYWORD)
    uk.add_step(["No Operation"])
    if chief is None:
        chief = ChiefController(Namespace(FakeSettings()))
    tcf_ctrl = TestCaseFileController(tcf, chief)
    chief._controller = tcf_ctrl
    tctablectrl = TestCaseTableController(tcf_ctrl, tcf.testcase_table)
    return TestCaseController(tctablectrl, testcase), chief._namespace
开发者ID:yanne,项目名称:RIDE,代码行数:23,代码来源:test_occurrences.py

示例5: TestCaseControllerWithSteps

# 需要导入模块: from robotide.controller import ChiefController [as 别名]
# 或者: from robotide.controller.ChiefController import _controller [as 别名]
def TestCaseControllerWithSteps(chief=None, source='some_suite.txt'):
    tcf = TestCaseFile()
    tcf.source = source
    tcf.setting_table.suite_setup.name = 'Suite Setup Kw'
    tcf.setting_table.test_setup.name = SUITE_TEST_SETUP_KEYWORD
    tcf.setting_table.test_teardown.name = 'Test Teardown Kw'
    tcf.setting_table.suite_teardown.name = 'Suite Teardown Kw'
    tcf.setting_table.test_template.value = SUITE_TEST_TEMPLATE_KEYWORD
    testcase = _create_testcase(tcf)
    uk = tcf.keyword_table.add(USERKEYWORD1_NAME)
    uk.add_step([KEYWORD_IN_USERKEYWORD1])
    uk = tcf.keyword_table.add(USERKEYWORD2_NAME)
    uk.add_step(['No Operation'])
    uk = tcf.keyword_table.add(EMBEDDED_ARGUMENTS_KEYWORD)
    uk.add_step(['No Operation'])
    if chief is None:
        library_manager = LibraryManager(':memory:')
        library_manager.create_database()
        chief = ChiefController(Namespace(FakeSettings()), library_manager=library_manager)
    tcf_ctrl = TestCaseFileController(tcf, chief)
    chief._controller = tcf_ctrl
    tctablectrl = TestCaseTableController(tcf_ctrl,
                                          tcf.testcase_table)
    return TestCaseController(tctablectrl, testcase), chief._namespace
开发者ID:blueenergy,项目名称:RIDE,代码行数:26,代码来源:test_occurrences.py

示例6: test_deleting_file_suite_under_dir_suite

# 需要导入模块: from robotide.controller import ChiefController [as 别名]
# 或者: from robotide.controller.ChiefController import _controller [as 别名]
 def test_deleting_file_suite_under_dir_suite(self):
     chief = ChiefController(Namespace())
     chief._controller = TestDataDirectoryController(TestDataDirectory(source=self._dirpath).populate(), chief)
     file_suite = chief.data.children[0]
     file_suite.remove()
     assert_true(len(chief.data.children) == 0, 'Child suite was not removed')
开发者ID:IlfirinPL,项目名称:RIDE,代码行数:8,代码来源:test_modifcations_on_disk.py


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