Public Member Functions | |
def | testClone |
def | testCopy |
def | testLargeList |
def | testUsingBlock |
Public Attributes | |
TestList |
Definition at line 544 of file Mixins.py.
def Mixins::testMixins::testClone | ( | self | ) |
Definition at line 570 of file Mixins.py.
00570 : 00571 class __Test(_TypedParameterizable): 00572 pass 00573 class __TestType(_SimpleParameterTypeBase): 00574 def _isValid(self,value): 00575 return True 00576 a = __Test("MyType",t=__TestType(1), u=__TestType(2)) 00577 b = a.clone(t=3, v=__TestType(4)) 00578 self.assertEqual(a.t.value(),1) 00579 self.assertEqual(a.u.value(),2) 00580 self.assertEqual(b.t.value(),3) 00581 self.assertEqual(b.u.value(),2) 00582 self.assertEqual(b.v.value(),4) 00583 self.assertRaises(TypeError,a.clone,None,**{"v":1}) 00584 unittest.main() unittest.main()
def Mixins::testMixins::testCopy | ( | self | ) |
Definition at line 560 of file Mixins.py.
00560 : 00561 class __Test(_TypedParameterizable): 00562 pass 00563 class __TestType(_SimpleParameterTypeBase): 00564 def _isValid(self,value): 00565 return True 00566 a = __Test("MyType",t=__TestType(1), u=__TestType(2)) 00567 b = a.copy() 00568 self.assertEqual(b.t.value(),1) 00569 self.assertEqual(b.u.value(),2) def testClone(self):
def Mixins::testMixins::testLargeList | ( | self | ) |
Definition at line 545 of file Mixins.py.
00545 : 00546 #lists larger than 255 entries can not be initialized 00547 #using the constructor 00548 args = [i for i in xrange(0,300)] 00549 00550 t = TestList(*args) 00551 pdump= t.dumpPython() 00552 class cms(object): 00553 def __init__(self): 00554 self.TestList = TestList 00555 pythonized = eval( pdump, globals(),{'cms':cms()} ) 00556 self.assertEqual(t,pythonized) def testUsingBlock(self):
def Mixins::testMixins::testUsingBlock | ( | self | ) |