def test_reorder_item(self): dockgroup1 = DockGroup() dockgroup2 = DockGroup() dockgroup3 = DockGroup() dockpaned = DockPaned() dockpaned.add(dockgroup1) dockpaned.add(dockgroup2) dockpaned.add(dockgroup3) dockpaned.reorder_item(dockgroup3, 0) dockpaned.reorder_item(dockgroup1, 2) self.assertTrue(dockpaned.item_num(dockgroup1) == 2) self.assertTrue(dockpaned.item_num(dockgroup2) == 1) self.assertTrue(dockpaned.item_num(dockgroup3) == 0) dockgroup3.destroy() dockgroup2.destroy() dockgroup1.destroy() dockpaned.destroy()
def test_item_num(self): dockgroup1 = DockGroup() dockgroup2 = DockGroup() dockpaned = DockPaned() dockpaned.add(dockgroup1) dockpaned.add(dockgroup2) self.assertTrue(dockpaned.item_num(dockgroup1) == 0) self.assertTrue(dockpaned.item_num(dockgroup2) == 1) dockgroup2.destroy() dockgroup1.destroy() dockpaned.destroy()