本文整理汇总了Python中Zone.Zone.generate_full_zone_name_suffix方法的典型用法代码示例。如果您正苦于以下问题:Python Zone.generate_full_zone_name_suffix方法的具体用法?Python Zone.generate_full_zone_name_suffix怎么用?Python Zone.generate_full_zone_name_suffix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zone.Zone
的用法示例。
在下文中一共展示了Zone.generate_full_zone_name_suffix方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_generate_area_name_suffix
# 需要导入模块: from Zone import Zone [as 别名]
# 或者: from Zone.Zone import generate_full_zone_name_suffix [as 别名]
def test_generate_area_name_suffix(self):
symbols = Zone.get_symbols()
combos = set()
for s1 in symbols:
for s2 in symbols:
if not s1:
continue
combos.add("{} {}".format(s1,s2).strip())
for i in range(1, 10101):
s = Zone.generate_full_zone_name_suffix(i)
self.assertTrue(s in combos)
combos.discard(s)
self.assertEqual(len(combos),0)
s = Zone.generate_full_zone_name_suffix(0)
self.assertEqual(s,"")
s = Zone.generate_full_zone_name_suffix(1)
self.assertEqual(s,"Alpha")
s = Zone.generate_full_zone_name_suffix(2)
self.assertEqual(s,"Beta")
s = Zone.generate_full_zone_name_suffix(9)
self.assertEqual(s,"November")
s = Zone.generate_full_zone_name_suffix(100)
self.assertEqual(s,"Zed")
s = Zone.generate_full_zone_name_suffix(101)
self.assertEqual(s,"Alpha Alpha")
s = Zone.generate_full_zone_name_suffix(102)
self.assertEqual(s,"Alpha Beta")
s = Zone.generate_full_zone_name_suffix(200)
self.assertEqual(s,"Alpha Zed")
s = Zone.generate_full_zone_name_suffix(201)
self.assertEqual(s,"Beta Alpha")
s = Zone.generate_full_zone_name_suffix(202)
self.assertEqual(s,"Beta Beta")
s = Zone.generate_full_zone_name_suffix(10099)
self.assertEqual(s,"Zed Omega")
s = Zone.generate_full_zone_name_suffix(10100)
self.assertEqual(s,"Zed Zed")
s = Zone.generate_full_zone_name_suffix(10101)
self.assertEqual(s,"Alpha 2")
s = Zone.generate_full_zone_name_suffix(10102)
self.assertEqual(s,"Beta 2")