本文整理匯總了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")