本文整理匯總了Python中Zone.Zone.skip_powers_of_base_in_number方法的典型用法代碼示例。如果您正苦於以下問題:Python Zone.skip_powers_of_base_in_number方法的具體用法?Python Zone.skip_powers_of_base_in_number怎麽用?Python Zone.skip_powers_of_base_in_number使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zone.Zone
的用法示例。
在下文中一共展示了Zone.skip_powers_of_base_in_number方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_convert_number_to_naming_number_base
# 需要導入模塊: from Zone import Zone [as 別名]
# 或者: from Zone.Zone import skip_powers_of_base_in_number [as 別名]
def test_convert_number_to_naming_number_base(self):
n = Zone.skip_powers_of_base_in_number(0,10)
self.assertEqual(n,0)
n = Zone.skip_powers_of_base_in_number(1,10)
self.assertEqual(n,1)
n = Zone.skip_powers_of_base_in_number(9,10)
self.assertEqual(n,9)
n = Zone.skip_powers_of_base_in_number(10,10)
self.assertEqual(n,11)
n = Zone.skip_powers_of_base_in_number(11,10)
self.assertEqual(n,12)
n = Zone.skip_powers_of_base_in_number(18,10)
self.assertEqual(n,19)
n = Zone.skip_powers_of_base_in_number(19,10)
self.assertEqual(n,21)
n = Zone.skip_powers_of_base_in_number(20,10)
self.assertEqual(n,22)
n = Zone.skip_powers_of_base_in_number(21,10)
self.assertEqual(n,23)
n = Zone.skip_powers_of_base_in_number(27,10)
self.assertEqual(n,29)
n = Zone.skip_powers_of_base_in_number(28,10)
self.assertEqual(n,31)
n = Zone.skip_powers_of_base_in_number(91,10)
self.assertEqual(n,101)
n = Zone.skip_powers_of_base_in_number(100,10)
self.assertEqual(n,111)