本文整理汇总了Python中sample.VirtualMethods.callCreateStr方法的典型用法代码示例。如果您正苦于以下问题:Python VirtualMethods.callCreateStr方法的具体用法?Python VirtualMethods.callCreateStr怎么用?Python VirtualMethods.callCreateStr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sample.VirtualMethods
的用法示例。
在下文中一共展示了VirtualMethods.callCreateStr方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testCallNonReimplementedMethodWithNone
# 需要导入模块: from sample import VirtualMethods [as 别名]
# 或者: from sample.VirtualMethods import callCreateStr [as 别名]
def testCallNonReimplementedMethodWithNone(self):
'''Calls createStr method from C++ with a None argument.'''
obj = VirtualMethods()
ok, string = obj.callCreateStr(None)
self.assertFalse(ok)
self.assertEqual(string, None)
示例2: testCallNonReimplementedMethodWithString
# 需要导入模块: from sample import VirtualMethods [as 别名]
# 或者: from sample.VirtualMethods import callCreateStr [as 别名]
def testCallNonReimplementedMethodWithString(self):
'''Calls createStr method from C++ with a Python string argument.'''
obj = VirtualMethods()
ok, string = obj.callCreateStr('foo')
self.assert_(ok)
self.assertEqual(string, Str('foo'))
示例3: testCallNonReimplementedMethodWithString
# 需要导入模块: from sample import VirtualMethods [as 别名]
# 或者: from sample.VirtualMethods import callCreateStr [as 别名]
def testCallNonReimplementedMethodWithString(self):
"""Calls createStr method from C++ with a Python string argument."""
obj = VirtualMethods()
ok, string = obj.callCreateStr("foo")
self.assertTrue(ok)
self.assertEqual(string, Str("foo"))