def test_index_and_slice(self, size):
        l = [None] * size
        self.assertEquals(len(l), size)
        self.assertEquals(l[-1], None)
        self.assertEquals(l[5], None)
        self.assertEquals(l[size - 1], None)
        self.assertRaises(IndexError, operator.getitem, l, size)
        self.assertEquals(l[:5], [None] * 5)
        self.assertEquals(l[-5:], [None] * 5)
        self.assertEquals(l[20:25], [None] * 5)
        self.assertEquals(l[-25:-20], [None] * 5)
        self.assertEquals(l[size - 5:], [None] * 5)
        self.assertEquals(l[size - 5:size], [None] * 5)
        self.assertEquals(l[size - 6:size - 2], [None] * 4)
        self.assertEquals(l[size:size], [])
        self.assertEquals(l[size:size+5], [])