本文整理汇总了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)
示例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',
]
示例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)
示例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
示例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)
示例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
示例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