本文整理汇总了Python中sample.Overload.acceptSequence方法的典型用法代码示例。如果您正苦于以下问题:Python Overload.acceptSequence方法的具体用法?Python Overload.acceptSequence怎么用?Python Overload.acceptSequence使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sample.Overload
的用法示例。
在下文中一共展示了Overload.acceptSequence方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testAcceptSequenceStrParamEnum
# 需要导入模块: from sample import Overload [as 别名]
# 或者: from sample.Overload import acceptSequence [as 别名]
def testAcceptSequenceStrParamEnum(self):
# Overload.acceptSequence(Str,Overload::ParamEnum)
overload = Overload()
self.assertEqual(overload.acceptSequence(''), Overload.Function2)
self.assertEqual(overload.acceptSequence('', Overload.Param0), Overload.Function2)
self.assertEqual(overload.acceptSequence(Str('')), Overload.Function2)
self.assertEqual(overload.acceptSequence(Str(''), Overload.Param0), Overload.Function2)
示例2: testAcceptSequencePyObject
# 需要导入模块: from sample import Overload [as 别名]
# 或者: from sample.Overload import acceptSequence [as 别名]
def testAcceptSequencePyObject(self):
# Overload.acceptSequence(void*)
overload = Overload()
class Foo(object):
pass
foo = Foo()
self.assertEqual(overload.acceptSequence(foo), Overload.Function5)
示例3: testAcceptSequenceStringList
# 需要导入模块: from sample import Overload [as 别名]
# 或者: from sample.Overload import acceptSequence [as 别名]
def testAcceptSequenceStringList(self):
# Overload.acceptSequence(const char**)
overload = Overload()
strings = ['line 1', 'line 2']
self.assertEqual(overload.acceptSequence(strings), Overload.Function4)
args = (['line 1', 2], )
result = raisesWithErrorMessage(overload.acceptSequence, args,
TypeError, 'The argument must be a sequence of strings.')
self.assert_(result)
示例4: testAcceptSequenceSize
# 需要导入模块: from sample import Overload [as 别名]
# 或者: from sample.Overload import acceptSequence [as 别名]
def testAcceptSequenceSize(self):
# Overload.acceptSequence(Size)
overload = Overload()
self.assertEqual(overload.acceptSequence(Size()), Overload.Function3)
示例5: testAcceptSequenceIntInt
# 需要导入模块: from sample import Overload [as 别名]
# 或者: from sample.Overload import acceptSequence [as 别名]
def testAcceptSequenceIntInt(self):
# Overload.acceptSequence(int,int)
overload = Overload()
self.assertEqual(overload.acceptSequence(1, 2), Overload.Function1)