本文整理汇总了Python中clientraw.ClientRaw.get_rainfall_rate方法的典型用法代码示例。如果您正苦于以下问题:Python ClientRaw.get_rainfall_rate方法的具体用法?Python ClientRaw.get_rainfall_rate怎么用?Python ClientRaw.get_rainfall_rate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clientraw.ClientRaw
的用法示例。
在下文中一共展示了ClientRaw.get_rainfall_rate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_rainfall_rate_field_populated_with_invalid_value
# 需要导入模块: from clientraw import ClientRaw [as 别名]
# 或者: from clientraw.ClientRaw import get_rainfall_rate [as 别名]
def test_rainfall_rate_field_populated_with_invalid_value(self):
testee = ClientRaw(self.__gen_populated_client_raw_str(ClientRaw.RAINFALL_RATE_MILLIMETRES_PER_MINUTE, "blah"))
self.assertEqual(None, testee.get_rainfall_rate())
示例2: test_no_field_for_rainfall_rate
# 需要导入模块: from clientraw import ClientRaw [as 别名]
# 或者: from clientraw.ClientRaw import get_rainfall_rate [as 别名]
def test_no_field_for_rainfall_rate(self):
testee = ClientRaw(self.__gen_empty_client_raw_str(ClientRaw.RAINFALL_RATE_MILLIMETRES_PER_MINUTE-1))
self.assertEqual(None, testee.get_rainfall_rate())
示例3: test_rainfall_rate_field_populated
# 需要导入模块: from clientraw import ClientRaw [as 别名]
# 或者: from clientraw.ClientRaw import get_rainfall_rate [as 别名]
def test_rainfall_rate_field_populated(self):
testee = ClientRaw(self.__gen_populated_client_raw_str(ClientRaw.RAINFALL_RATE_MILLIMETRES_PER_MINUTE, "0.12"))
self.assertEqual(0.12, testee.get_rainfall_rate().get_value(RainfallUnit.MILLIMETRES))