本文整理汇总了Python中PyObjCTest.pythonset.OC_TestSet.set_mutableCopyWithZone_方法的典型用法代码示例。如果您正苦于以下问题:Python OC_TestSet.set_mutableCopyWithZone_方法的具体用法?Python OC_TestSet.set_mutableCopyWithZone_怎么用?Python OC_TestSet.set_mutableCopyWithZone_使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyObjCTest.pythonset.OC_TestSet
的用法示例。
在下文中一共展示了OC_TestSet.set_mutableCopyWithZone_方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testMutableCopy
# 需要导入模块: from PyObjCTest.pythonset import OC_TestSet [as 别名]
# 或者: from PyObjCTest.pythonset.OC_TestSet import set_mutableCopyWithZone_ [as 别名]
def testMutableCopy(self):
s = self.seqClass(range(20))
o = OC_TestSet.set_mutableCopyWithZone_(s, None)
self.assertEquals(list(s), o)
self.assert_(s is not o)
self.assert_(isinstance(o, list))
s = self.seqClass()
o = OC_TestSet.set_mutableCopyWithZone_(s, None)
self.assertEquals(list(s), o)
self.assert_(s is not o)
self.assert_(isinstance(o, list))
示例2: testMutableCopy
# 需要导入模块: from PyObjCTest.pythonset import OC_TestSet [as 别名]
# 或者: from PyObjCTest.pythonset.OC_TestSet import set_mutableCopyWithZone_ [as 别名]
def testMutableCopy(self):
s = self.setClass(range(20))
o = OC_TestSet.set_mutableCopyWithZone_(s, None)
self.assertEqual(s, o)
self.assertIsNot(s, o)
self.assertIsInstance(o, set)
s = self.setClass()
o = OC_TestSet.set_mutableCopyWithZone_(s, None)
self.assertEqual(s, o)
self.assertIsNot(s, o)
self.assertIsInstance(o, set)
示例3: testMutableCopy
# 需要导入模块: from PyObjCTest.pythonset import OC_TestSet [as 别名]
# 或者: from PyObjCTest.pythonset.OC_TestSet import set_mutableCopyWithZone_ [as 别名]
def testMutableCopy(self):
s = self.mapClass({1:2, 'a':'c'})
o = OC_TestSet.set_mutableCopyWithZone_(s, None)
self.assertEquals(dict(s), o)
self.assert_(s is not o)
self.assert_(isinstance(o, dict))
s = self.mapClass()
o = OC_TestSet.set_mutableCopyWithZone_(s, None)
self.assertEquals(dict(s), o)
self.assert_(s is not o)
self.assert_(isinstance(o, dict))
示例4: testMutableCopy
# 需要导入模块: from PyObjCTest.pythonset import OC_TestSet [as 别名]
# 或者: from PyObjCTest.pythonset.OC_TestSet import set_mutableCopyWithZone_ [as 别名]
def testMutableCopy(self):
s = self.mapClass({1:2, 'a':'c'})
o = OC_TestSet.set_mutableCopyWithZone_(s, None)
self.assertEqual(dict(s), o)
self.assertIsNot(s, o)
self.assertIsInstance(o, dict)
s = self.mapClass()
o = OC_TestSet.set_mutableCopyWithZone_(s, None)
self.assertEqual(dict(s), o)
self.assertIsNot(s, o)
self.assertIsInstance(o, dict)