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


Python InstanceFileHandler.getInstanceConfig方法代码示例

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


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

示例1: testInstanceConfigDictionary

# 需要导入模块: from val_description.InstanceFileHandler import InstanceFileHandler [as 别名]
# 或者: from val_description.InstanceFileHandler.InstanceFileHandler import getInstanceConfig [as 别名]
    def testInstanceConfigDictionary(self):
        sampleInstanceFile = self.testDirectory + \
            '/test_files/sample_instance.xml'
        instanceFileHandler = InstanceFileHandler(sampleInstanceFile)

        expectedConfigDictionary = {'/left_leg/ankle/actuator0': {'configFiles': ['v_e_001.xml', 'e.xml', 'e_sv.xml', 'testbench.xml',
                                                                                  'sensors.xml', 'safety.xml', 'mode.xml'], 'firmware': 'linear/turbo_bootloader.bin', 'type': 'turbodriver', 'location': '/left_leg/ankle/actuator0'}, '/left_leg/j1':
                                    {'configFiles': ['v_a_001.xml', 'a.xml', 'a_sv.xml', 'testbench.xml', 'sensors.xml', 'safety.xml', 'mode.xml'], 'firmware':
                                     'rotary/turbo_bootloader.bin', 'type': 'turbodriver', 'location': '/left_leg/j1'}, '/left_leg/ankle/actuator1': {'configFiles':
                                                                                                                                                      ['v_e_002.xml', 'e.xml', 'e_sv.xml', 'testbench.xml',
                                                                                                                                                          'sensors.xml', 'safety.xml', 'mode.xml'],
                                                                                                                                                      'firmware': 'linear/turbo_bootloader.bin', 'type': 'turbodriver', 'location': '/left_leg/ankle/actuator1'}}

        instanceConfig = instanceFileHandler.getInstanceConfig()
        assert cmp(instanceConfig, expectedConfigDictionary) == 0
开发者ID:uml-robotics,项目名称:val_description,代码行数:17,代码来源:test_InstanceFileHandler.py

示例2: testInstanceConfigDictionary

# 需要导入模块: from val_description.InstanceFileHandler import InstanceFileHandler [as 别名]
# 或者: from val_description.InstanceFileHandler.InstanceFileHandler import getInstanceConfig [as 别名]
    def testInstanceConfigDictionary(self):
        sampleInstanceFile = self.testDirectory + \
            '/test_files/sample_instance.xml'
        instanceFileHandler = InstanceFileHandler(sampleInstanceFile)

        instanceConfig = instanceFileHandler.getInstanceConfig()

        # Check some of them, to many to check them all though.
        assert('test_v_e_001.xml' in instanceConfig['/left_leg/ankle/actuator0']['configFiles'])
        assert('test_e_futek_dh.xml' in instanceConfig['/left_leg/ankle/actuator0']['configFiles'])
        assert('test_ankle_linear.xml' in instanceConfig['/left_leg/ankle/actuator0']['configFiles'])

        assert('test_v_e_003.xml' in instanceConfig['/trunk/left_actuator']['configFiles'])
        assert('test_e_renishaw_dh.xml' in instanceConfig['/trunk/left_actuator']['configFiles'])
        assert('test_trunk_linear.xml' in instanceConfig['/trunk/left_actuator']['configFiles'])

        assert('test_v_a_001.xml' in instanceConfig['/left_leg/j1']['configFiles'])
开发者ID:RIVeR-Lab,项目名称:ihmc-open-robotics-software,代码行数:19,代码来源:test_InstanceFileHandler.py


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