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


Python BaseEntity.eval_deps_status方法代码示例

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


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

示例1: test_eval_deps_no_status

# 需要导入模块: from MilkCheck.Engine.BaseEntity import BaseEntity [as 别名]
# 或者: from MilkCheck.Engine.BaseEntity.BaseEntity import eval_deps_status [as 别名]
 def test_eval_deps_no_status(self):
     """Test that eval_deps_status return NO_STATUS"""
     service = BaseEntity("test_service")
     serv_a = BaseEntity("A")
     serv_b = BaseEntity("B")
     serv_a.status = WARNING
     service.add_dep(serv_a)
     service.add_dep(serv_b, CHECK)
     self.assertEqual(service.eval_deps_status(), NO_STATUS)
     serv_a.status = NO_STATUS
     serv_b.status = WARNING
     self.assertEqual(service.eval_deps_status(), NO_STATUS)
开发者ID:cea-hpc,项目名称:milkcheck,代码行数:14,代码来源:BaseEntityTest.py

示例2: test_eval_deps_warnings

# 需要导入模块: from MilkCheck.Engine.BaseEntity import BaseEntity [as 别名]
# 或者: from MilkCheck.Engine.BaseEntity.BaseEntity import eval_deps_status [as 别名]
 def test_eval_deps_warnings(self):
     """eval_deps_status() is DONE with REQUIRE_WEAK on error"""
     service = BaseEntity("test_service")
     serv_a = BaseEntity("A")
     serv_b = BaseEntity("B")
     service.add_dep(serv_a, REQUIRE_WEAK)
     service.add_dep(serv_b, REQUIRE_WEAK)
     serv_a.status = DONE
     serv_b.status = ERROR
     self.assertEqual(service.eval_deps_status(), DONE)
     serv_b.status = DEP_ERROR
     serv_a.status = TIMEOUT
     self.assertEqual(service.eval_deps_status(), DONE)
开发者ID:cea-hpc,项目名称:milkcheck,代码行数:15,代码来源:BaseEntityTest.py

示例3: test_eval_deps_waiting

# 需要导入模块: from MilkCheck.Engine.BaseEntity import BaseEntity [as 别名]
# 或者: from MilkCheck.Engine.BaseEntity.BaseEntity import eval_deps_status [as 别名]
 def test_eval_deps_waiting(self):
     """Test that eval_deps_status return WAITING_STATUS"""
     service = BaseEntity("test_service")
     serv_a = BaseEntity("A")
     serv_b = BaseEntity("B")
     service.add_dep(serv_a)
     service.add_dep(serv_b, CHECK)
     serv_a.status = WAITING_STATUS
     self.assertEqual(service.eval_deps_status(), WAITING_STATUS)
开发者ID:cea-hpc,项目名称:milkcheck,代码行数:11,代码来源:BaseEntityTest.py

示例4: test_eval_deps_error

# 需要导入模块: from MilkCheck.Engine.BaseEntity import BaseEntity [as 别名]
# 或者: from MilkCheck.Engine.BaseEntity.BaseEntity import eval_deps_status [as 别名]
 def test_eval_deps_error(self):
     """Test that eval_deps_status return DEP_ERROR"""
     service = BaseEntity("test_service")
     serv_a = BaseEntity("A")
     serv_b = BaseEntity("B")
     service.add_dep(serv_a)
     service.add_dep(serv_b, CHECK)
     serv_b.status = DONE
     serv_a.status = TIMEOUT
     self.assertEqual(service.eval_deps_status(), DEP_ERROR)
开发者ID:cea-hpc,项目名称:milkcheck,代码行数:12,代码来源:BaseEntityTest.py


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