本文整理汇总了Python中ShipGeoConfig.ConfigRegistry.keys方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigRegistry.keys方法的具体用法?Python ConfigRegistry.keys怎么用?Python ConfigRegistry.keys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShipGeoConfig.ConfigRegistry
的用法示例。
在下文中一共展示了ConfigRegistry.keys方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_true
# 需要导入模块: from ShipGeoConfig import ConfigRegistry [as 别名]
# 或者: from ShipGeoConfig.ConfigRegistry import keys [as 别名]
def test_true(self):
c = ConfigRegistry.loadpys(self.config, MU_SHIELD_ENABLED=True)
self.assertTrue("muShield" in c)
assert len(ConfigRegistry.keys()) == 1, ConfigRegistry.keys()
assert self.key in ConfigRegistry.keys()
assert ConfigRegistry[self.key].Bfield.max == 1.5*u.kilogauss
assert ConfigRegistry[self.key].muShield.dZ1 == 2.5*u.m
示例2: test_key
# 需要导入模块: from ShipGeoConfig import ConfigRegistry [as 别名]
# 或者: from ShipGeoConfig.ConfigRegistry import keys [as 别名]
def test_key(self):
assert self.key in ConfigRegistry.keys()
示例3: test_len
# 需要导入模块: from ShipGeoConfig import ConfigRegistry [as 别名]
# 或者: from ShipGeoConfig.ConfigRegistry import keys [as 别名]
def test_len(self):
assert len(ConfigRegistry.keys()) == 1, ConfigRegistry.keys()
示例4: test_false
# 需要导入模块: from ShipGeoConfig import ConfigRegistry [as 别名]
# 或者: from ShipGeoConfig.ConfigRegistry import keys [as 别名]
def test_false(self):
ConfigRegistry.loadpys(self.config, MU_SHIELD_ENABLED=False)
assert len(ConfigRegistry.keys()) == 1, ConfigRegistry.keys()
assert self.key in ConfigRegistry.keys()
assert ConfigRegistry[self.key].Bfield.max == 1.5*u.kilogauss
self.assertTrue("muShield" not in ConfigRegistry[self.key])