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


Python ShakeEvent.event_info方法代码示例

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


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

示例1: test_event_info_string

# 需要导入模块: from realtime.shake_event import ShakeEvent [as 别名]
# 或者: from realtime.shake_event.ShakeEvent import event_info [as 别名]
 def test_event_info_string(self):
     """Test we can get a location info string nicely."""
     shake_event = ShakeEvent(SHAKE_ID, data_is_local_flag=True)
     degree_symbol = unichr(176)
     expected_result = (
         'M 3.6 5-11-2013 6:8:9 Latitude: 2%s25\'48.00"S Longitude: '
         '140%s37\'12.00"E Depth: 10.0km Located 0.00km n/a of n/a'
         % (degree_symbol, degree_symbol))
     result = shake_event.event_info()
     message = ('Got:\n%s\nExpected:\n%s\n' %
                (result, expected_result))
     self.assertEqual(result, expected_result, message)
开发者ID:mahardika,项目名称:inasafe,代码行数:14,代码来源:test_shake_event.py

示例2: test_event_info_string

# 需要导入模块: from realtime.shake_event import ShakeEvent [as 别名]
# 或者: from realtime.shake_event.ShakeEvent import event_info [as 别名]
 def test_event_info_string(self):
     """Test we can get a location info string nicely."""
     working_dir = shakemap_extract_dir()
     shake_event = ShakeEvent(working_dir=working_dir, event_id=SHAKE_ID, data_is_local_flag=True)
     expected_result = (
         u"M 3.6 5-11-2013 6:8:9 Latitude: 2°25′48.00"
         u"″S Longitude: 140°37"
         u"′"
         u"12.00″E Depth: 10.0km Located 0.00km n/a of n/a"
     )
     result = shake_event.event_info()
     message = "Got:\n%s\nExpected:\n%s\n" % (result, expected_result)
     self.assertEqual(result, expected_result, message)
开发者ID:Mloweedgar,项目名称:inasafe,代码行数:15,代码来源:test_shake_event.py

示例3: test_event_info_string

# 需要导入模块: from realtime.shake_event import ShakeEvent [as 别名]
# 或者: from realtime.shake_event.ShakeEvent import event_info [as 别名]
 def test_event_info_string(self):
     """Test we can get a location info string nicely."""
     shake_id = '20120726022003'
     shake_event = ShakeEvent(shake_id)
     degree_symbol = unichr(176)
     expected_result = (
         'M 5.0 26-7-2012 2:15:35 Latitude: 0%s12\'36.00"S Longitude: '
         '124%s27\'0.00"E Depth: 11.0km Located 0.00km n/a of n/a'
         % (degree_symbol, degree_symbol))
     result = shake_event.event_info()
     message = ('Got:\n%s\nExpected:\n%s\n' %
                (result, expected_result))
     assert result == expected_result, message
开发者ID:FlavioFalcao,项目名称:inasafe,代码行数:15,代码来源:test_shake_event.py


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