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


Python ConfigurationManager.load_local方法代码示例

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


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

示例1: __init__

# 需要导入模块: from mycroft.configuration import ConfigurationManager [as 别名]
# 或者: from mycroft.configuration.ConfigurationManager import load_local [as 别名]
    def __init__(self, args):
        params = self.__build_params(args)

        if params.config:
            ConfigurationManager.load_local([params.config])

        if exists(params.lib) and isdir(params.lib):
            sys.path.append(params.lib)

        sys.path.append(params.dir)
        self.dir = params.dir

        self.enable_intent = params.enable_intent

        self.__init_client(params)
开发者ID:aatchison,项目名称:mycroft-core,代码行数:17,代码来源:container.py

示例2: XMLTestRunner

# 需要导入模块: from mycroft.configuration import ConfigurationManager [as 别名]
# 或者: from mycroft.configuration.ConfigurationManager import load_local [as 别名]
import sys
import unittest

from os.path import dirname
from xmlrunner import XMLTestRunner

from mycroft.configuration import ConfigurationManager

__author__ = 'seanfitz, jdorleans'
if __name__ == "__main__":
    fail_on_error = "--fail-on-error" in sys.argv
    ConfigurationManager.load_local(['mycroft.ini'])

    tests = unittest.TestLoader().discover(dirname(__file__), "*.py")
    runner = XMLTestRunner("./build/report/tests")
    result = runner.run(tests)

    if fail_on_error and len(result.failures + result.errors) > 0:
        sys.exit(1)
开发者ID:Acidburn0zzz,项目名称:mycroft-core,代码行数:21,代码来源:test_runner.py

示例3: test_load_local_with_locations

# 需要导入模块: from mycroft.configuration import ConfigurationManager [as 别名]
# 或者: from mycroft.configuration.ConfigurationManager import load_local [as 别名]
 def test_load_local_with_locations(self):
     ConfigurationManager.load_defaults()
     config = ConfigurationManager.load_local([self.config_path])
     self.assert_config(config, 'pt-br', 'espeak')
开发者ID:Acidburn0zzz,项目名称:mycroft-core,代码行数:6,代码来源:__init__.py

示例4: test_load_local

# 需要导入模块: from mycroft.configuration import ConfigurationManager [as 别名]
# 或者: from mycroft.configuration.ConfigurationManager import load_local [as 别名]
 def test_load_local(self):
     ConfigurationManager.load_defaults()
     self.assert_config(ConfigurationManager.load_local())
开发者ID:Acidburn0zzz,项目名称:mycroft-core,代码行数:5,代码来源:__init__.py

示例5: TestLoader

# 需要导入模块: from mycroft.configuration import ConfigurationManager [as 别名]
# 或者: from mycroft.configuration.ConfigurationManager import load_local [as 别名]
import sys
from unittest import TestLoader

from os.path import dirname
from xmlrunner import XMLTestRunner

from mycroft.configuration import ConfigurationManager

__author__ = 'seanfitz, jdorleans'

if __name__ == "__main__":
    fail_on_error = "--fail-on-error" in sys.argv
    ConfigurationManager.load_local(['mycroft.conf'], keep_user_config=False)

    tests = TestLoader().discover(dirname(__file__), "*.py")
    result = XMLTestRunner("./build/report/tests").run(tests)

    if fail_on_error and len(result.failures + result.errors) > 0:
        sys.exit(1)
开发者ID:ChristopherRogers1991,项目名称:mycroft-core,代码行数:21,代码来源:main.py


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