本文整理汇总了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)