Lines Matching refs:lst
154 lst = list('ab!cdefghi!j')
155 del lst[self.o]
156 del lst[self.n]
157 lst[self.o] = 'X'
158 lst[self.n] = 'Y'
159 self.assertEqual(lst, list('abYdefghXj'))
161 lst = [5, 6, 7, 8, 9, 10, 11]
162 lst.__setitem__(self.n, "here")
163 self.assertEqual(lst, [5, 6, "here", 8, 9, 10, 11])
164 lst.__delitem__(self.n)
165 self.assertEqual(lst, [5, 6, 8, 9, 10, 11])
170 lst = [6, 4]
171 lst *= self.o
172 self.assertEqual(lst, [6, 4, 6, 4])
173 lst *= self.n
174 self.assertEqual(lst, [6, 4, 6, 4] * 3)
176 lst = [5, 6, 7, 8, 9, 11]
177 l2 = lst.__imul__(self.n)
178 self.assertIs(l2, lst)
179 self.assertEqual(lst, [5, 6, 7, 8, 9, 11] * 3)