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


Python Settings.read_settings_from_file方法代码示例

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


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

示例1: test_get_current_settings_should_return_current_settings

# 需要导入模块: from settings import Settings [as 别名]
# 或者: from settings.Settings import read_settings_from_file [as 别名]
    def test_get_current_settings_should_return_current_settings(self):
        settings_xml = Settings()
        settings_xml.read_settings_from_file()
        
        current_settings = settings_xml.get_current_settings()
        shared_items = set(current_settings.items()) & set(expected.items())

        self.assertEqual(True, True)
开发者ID:rsanchezG,项目名称:sudokuB-1,代码行数:10,代码来源:test_settings.py

示例2: test_set_config_should_update_value_for_algorithm_to_backtracking

# 需要导入模块: from settings import Settings [as 别名]
# 或者: from settings.Settings import read_settings_from_file [as 别名]
 def test_set_config_should_update_value_for_algorithm_to_backtracking(self):
     new_default = "Backtracking"
     settings_xml = Settings()
     settings_xml.read_settings_from_file()
     settings_xml.set_config("Algorithm", new_default)
     settings_xml.write_settings()
     settings_xml.read_settings_from_file()
     result = settings_xml.get_name_for_current_setting("Algorithm")
     self.assertEqual(new_default, result)
开发者ID:rsanchezG,项目名称:sudokuB-1,代码行数:11,代码来源:test_settings.py

示例3: test_set_config_should_update_value_for_level_easy_to_max_35

# 需要导入模块: from settings import Settings [as 别名]
# 或者: from settings.Settings import read_settings_from_file [as 别名]
 def test_set_config_should_update_value_for_level_easy_to_max_35(self):
     setting_node = "Level"
     setting_name = "Easy"
     attribute_name = "max"
     new_attribute_value = "35"
     settings_xml = Settings()
     settings_xml.read_settings_from_file()
     settings_xml.set_config_attributes(setting_node, setting_name, attribute_name, new_attribute_value)
     settings_xml.write_settings()
     settings_xml.read_settings_from_file()
     result = settings_xml.get_attribute_value_for_setting(setting_node, setting_name, attribute_name)
     self.assertEqual(new_attribute_value, result)
开发者ID:rsanchezG,项目名称:sudokuB-1,代码行数:14,代码来源:test_settings.py


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