本文整理汇总了Python中prime_factor.PrimeFactor.generate方法的典型用法代码示例。如果您正苦于以下问题:Python PrimeFactor.generate方法的具体用法?Python PrimeFactor.generate怎么用?Python PrimeFactor.generate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类prime_factor.PrimeFactor
的用法示例。
在下文中一共展示了PrimeFactor.generate方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_one
# 需要导入模块: from prime_factor import PrimeFactor [as 别名]
# 或者: from prime_factor.PrimeFactor import generate [as 别名]
def test_one(self):
self.assertEqual([], PrimeFactor.generate(1))
示例2: test_two
# 需要导入模块: from prime_factor import PrimeFactor [as 别名]
# 或者: from prime_factor.PrimeFactor import generate [as 别名]
def test_two(self):
self.assertEqual([2], PrimeFactor.generate(2))
示例3: test_eight
# 需要导入模块: from prime_factor import PrimeFactor [as 别名]
# 或者: from prime_factor.PrimeFactor import generate [as 别名]
def test_eight(self):
self.assertEqual([2, 2, 2], PrimeFactor.generate(8))
示例4: test_nine
# 需要导入模块: from prime_factor import PrimeFactor [as 别名]
# 或者: from prime_factor.PrimeFactor import generate [as 别名]
def test_nine(self):
self.assertEqual([3, 3], PrimeFactor.generate(9))
示例5: test_six
# 需要导入模块: from prime_factor import PrimeFactor [as 别名]
# 或者: from prime_factor.PrimeFactor import generate [as 别名]
def test_six(self):
self.assertEqual([2, 3], PrimeFactor.generate(6))
示例6: test_four
# 需要导入模块: from prime_factor import PrimeFactor [as 别名]
# 或者: from prime_factor.PrimeFactor import generate [as 别名]
def test_four(self):
self.assertEqual([2, 2], PrimeFactor.generate(4))
示例7: test_three
# 需要导入模块: from prime_factor import PrimeFactor [as 别名]
# 或者: from prime_factor.PrimeFactor import generate [as 别名]
def test_three(self):
self.assertEqual([3], PrimeFactor.generate(3))
示例8: test_fourteen
# 需要导入模块: from prime_factor import PrimeFactor [as 别名]
# 或者: from prime_factor.PrimeFactor import generate [as 别名]
def test_fourteen(self):
self.assertEqual([2, 7], PrimeFactor.generate(14))
示例9: test_nine
# 需要导入模块: from prime_factor import PrimeFactor [as 别名]
# 或者: from prime_factor.PrimeFactor import generate [as 别名]
def test_nine(self):
self.assertEqual([11], PrimeFactor.generate(11))