本文整理汇总了Python中Controller.Controller.get_command方法的典型用法代码示例。如果您正苦于以下问题:Python Controller.get_command方法的具体用法?Python Controller.get_command怎么用?Python Controller.get_command使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller.Controller
的用法示例。
在下文中一共展示了Controller.get_command方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_on_when_too_cold
# 需要导入模块: from Controller import Controller [as 别名]
# 或者: from Controller.Controller import get_command [as 别名]
def test_get_on_when_too_cold(self):
t_lower = 15
t_upper = 18
c = Controller(t_lower, t_upper)
assert c.get_command(13) == True
示例2: test_first_measurement_in_range
# 需要导入模块: from Controller import Controller [as 别名]
# 或者: from Controller.Controller import get_command [as 别名]
def test_first_measurement_in_range(self):
t_lower = 15
t_upper = 18
c = Controller(t_lower, t_upper)
assert c.get_command(16) == False
示例3: test_hysteresis_from_below
# 需要导入模块: from Controller import Controller [as 别名]
# 或者: from Controller.Controller import get_command [as 别名]
def test_hysteresis_from_below(self):
t_lower = 15
t_upper = 18
c = Controller(t_lower, t_upper)
c.get_command(14)
assert c.get_command(15) == True
示例4: test_hysteresis_from_above
# 需要导入模块: from Controller import Controller [as 别名]
# 或者: from Controller.Controller import get_command [as 别名]
def test_hysteresis_from_above(self):
t_lower = 15
t_upper = 18
c = Controller(t_lower, t_upper)
c.get_command(19)
assert c.get_command(16) == False
示例5: test_get_off_when_too_hot
# 需要导入模块: from Controller import Controller [as 别名]
# 或者: from Controller.Controller import get_command [as 别名]
def test_get_off_when_too_hot(self):
t_lower = 15
t_upper = 18
c = Controller(t_lower, t_upper)
assert c.get_command(22) == False