def _testPackUnpack(self, text): vals = dict(item=None, subItem=None, state=1, stateMask=2, text=text, image=3, param=4, indent=5) ti, extra = win32gui_struct.PackLVITEM(**vals) item, subItem, state, stateMask, text, image, param, indent = \ win32gui_struct.UnpackLVITEM(ti) # patch expected values. vals['item'] = 0 vals['subItem'] = 0 self.assertDictEquals(vals, item=item, subItem=subItem, state=state, stateMask=stateMask, text=text, image=image, param=param, indent=indent)
def testEmpty(self): ti, extras = win32gui_struct.EmptyLVITEM(1, 2) item, subItem, state, stateMask, text, image, param, indent = \ win32gui_struct.UnpackLVITEM(ti) self.failUnlessEqual(item, 1) self.failUnlessEqual(subItem, 2) self.failUnlessEqual(state, 0) self.failUnlessEqual(stateMask, 0) self.failUnlessEqual(text, '') self.failUnlessEqual(image, 0) self.failUnlessEqual(param, 0) self.failUnlessEqual(indent, 0)
def testEmpty(self): ti, extras = win32gui_struct.EmptyLVITEM(1, 2) item, subItem, state, stateMask, text, image, param, indent = \ win32gui_struct.UnpackLVITEM(ti) assert item == 1 assert subItem == 2 assert state == 0 assert stateMask == 0 assert text == '' assert image == 0 assert param == 0 assert indent == 0
def testEmpty(self): ti, extras = win32gui_struct.EmptyLVITEM(1, 2) ( item, subItem, state, stateMask, text, image, param, indent, ) = win32gui_struct.UnpackLVITEM(ti) self.assertEqual(item, 1) self.assertEqual(subItem, 2) self.assertEqual(state, 0) self.assertEqual(stateMask, 0) self.assertEqual(text, "") self.assertEqual(image, 0) self.assertEqual(param, 0) self.assertEqual(indent, 0)