def testOrderedCollectionsTicket2547(self): pixels = PixelsI() channels = [ChannelI() for x in range(3)] pixels.addChannel(channels[0]) assert 1 == pixels.sizeOfChannels() old = pixels.setChannel(0, channels[1]) assert old == channels[0] assert 1 == pixels.sizeOfChannels()
def testOrderedCollectionsTicket2547(self): pixels = PixelsI() channels = [ChannelI() for x in range(3)] pixels.addChannel(channels[0]) self.assertEquals(1, pixels.sizeOfChannels()) old = pixels.setChannel(0, channels[1]) self.assertEquals(old, channels[0]) self.assertEquals(1, pixels.sizeOfChannels())