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


Python YamlRawParameter.make_raw_parameters方法代码示例

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


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

示例1: setUp

# 需要导入模块: from conda.common.configuration import YamlRawParameter [as 别名]
# 或者: from conda.common.configuration.YamlRawParameter import make_raw_parameters [as 别名]
 def setUp(self):
     string = dals("""
     custom_channels:
       darwin: https://some.url.somewhere/stuff
       chuck: http://another.url:8080/with/path
     custom_multichannels:
       michele:
         - https://do.it.with/passion
         - learn_from_every_thing
       steve:
         - more-downloads
     migrated_custom_channels:
       darwin: s3://just/cant
       chuck: file:///var/lib/repo/
     migrated_channel_aliases:
       - https://conda.anaconda.org
     channel_alias: ftp://new.url:8082
     conda-build:
       root-dir: /some/test/path
     proxy_servers:
       http: http://user:[email protected]:8080
       https: none
       ftp:
       sftp: ''
       ftps: false
       rsync: 'false'
     aggressive_update_packages: []
     """)
     reset_context()
     rd = odict(testdata=YamlRawParameter.make_raw_parameters('testdata', yaml_load(string)))
     context._set_raw_data(rd)
开发者ID:groutr,项目名称:conda,代码行数:33,代码来源:test_context.py

示例2: setUpClass

# 需要导入模块: from conda.common.configuration import YamlRawParameter [as 别名]
# 或者: from conda.common.configuration.YamlRawParameter import make_raw_parameters [as 别名]
    def setUpClass(cls):
        string = dals("""
        custom_channels:
          darwin: https://some.url.somewhere/stuff
          chuck: http://user1:[email protected]:8080/t/tk-1234/with/path
          pkgs/free: http://192.168.0.15:8080
        migrated_custom_channels:
          darwin: s3://just/cant
          chuck: file:///var/lib/repo/
          pkgs/free: https://repo.continuum.io
        migrated_channel_aliases:
          - https://conda.anaconda.org
        channel_alias: ftp://new.url:8082
        default_channels:
          - http://192.168.0.15:8080/pkgs/free
          - http://192.168.0.15:8080/pkgs/pro
          - http://192.168.0.15:8080/pkgs/msys2
        """)
        reset_context()
        rd = odict(testdata=YamlRawParameter.make_raw_parameters('testdata', yaml_load(string)))
        context._add_raw_data(rd)
        Channel._reset_state()

        cls.platform = context.subdir

        cls.DEFAULT_URLS = ['http://192.168.0.15:8080/pkgs/free/%s' % cls.platform,
                            'http://192.168.0.15:8080/pkgs/free/noarch',
                            'http://192.168.0.15:8080/pkgs/pro/%s' % cls.platform,
                            'http://192.168.0.15:8080/pkgs/pro/noarch',
                            'http://192.168.0.15:8080/pkgs/msys2/%s' % cls.platform,
                            'http://192.168.0.15:8080/pkgs/msys2/noarch',
                            ]
开发者ID:Korijn,项目名称:conda,代码行数:34,代码来源:test_channel.py

示例3: test_client_ssl_cert

# 需要导入模块: from conda.common.configuration import YamlRawParameter [as 别名]
# 或者: from conda.common.configuration.YamlRawParameter import make_raw_parameters [as 别名]
 def test_client_ssl_cert(self):
     string = dals("""
     client_ssl_cert_key: /some/key/path
     """)
     reset_context()
     rd = odict(testdata=YamlRawParameter.make_raw_parameters('testdata', yaml_load(string)))
     context._set_raw_data(rd)
     pytest.raises(ValidationError, context.validate_configuration)
开发者ID:groutr,项目名称:conda,代码行数:10,代码来源:test_context.py

示例4: setUpClass

# 需要导入模块: from conda.common.configuration import YamlRawParameter [as 别名]
# 或者: from conda.common.configuration.YamlRawParameter import make_raw_parameters [as 别名]
    def setUpClass(cls):
        string = dals("""
        default_channels:
           - http://test/conda/anaconda
        channels:
           - http://test/conda/anaconda-cluster
        """)
        reset_context()
        rd = odict(testdata=YamlRawParameter.make_raw_parameters('testdata', yaml_load(string)))
        context._set_raw_data(rd)
        Channel._reset_state()

        cls.platform = context.subdir
开发者ID:dhirschfeld,项目名称:conda,代码行数:15,代码来源:test_channel.py

示例5: setUp

# 需要导入模块: from conda.common.configuration import YamlRawParameter [as 别名]
# 或者: from conda.common.configuration.YamlRawParameter import make_raw_parameters [as 别名]
 def setUp(self):
     string = dals("""
     custom_channels:
       darwin: https://some.url.somewhere/stuff
       chuck: http://another.url:8080/with/path
     migrated_custom_channels:
       darwin: s3://just/cant
       chuck: file:///var/lib/repo/
     migrated_channel_aliases:
       - https://conda.anaconda.org
     channel_alias: ftp://new.url:8082
     """)
     reset_context()
     rd = odict(testdata=YamlRawParameter.make_raw_parameters('testdata', yaml_load(string)))
     context._add_raw_data(rd)
开发者ID:jaimergp,项目名称:conda,代码行数:17,代码来源:test_context.py

示例6: test_invalid_seq_parameter

# 需要导入模块: from conda.common.configuration import YamlRawParameter [as 别名]
# 或者: from conda.common.configuration.YamlRawParameter import make_raw_parameters [as 别名]
 def test_invalid_seq_parameter(self):
     data = odict(s1=YamlRawParameter.make_raw_parameters('s1', {'channels': 'y_u_no_tuple'}))
     config = SampleConfiguration()._set_raw_data(data)
     with raises(InvalidTypeError):
         config.channels
开发者ID:conda,项目名称:conda,代码行数:7,代码来源:test_configuration.py

示例7: test_invalid_map_parameter

# 需要导入模块: from conda.common.configuration import YamlRawParameter [as 别名]
# 或者: from conda.common.configuration.YamlRawParameter import make_raw_parameters [as 别名]
 def test_invalid_map_parameter(self):
     data = odict(s1=YamlRawParameter.make_raw_parameters('s1', {'proxy_servers': 'blah'}))
     config = SampleConfiguration()._set_raw_data(data)
     with raises(InvalidTypeError):
         config.proxy_servers
开发者ID:conda,项目名称:conda,代码行数:7,代码来源:test_configuration.py


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