Home | History | Annotate | Download | only in test

Lines Matching refs:spamlist

295         # Testing spamlist operations...
298 def spamlist(l, memo=None):
300 return spam.spamlist(l)
303 copy._deepcopy_dispatch[spam.spamlist] = spamlist
305 self.binop_test(spamlist([1]), spamlist([2]), spamlist([1,2]), "a+b",
307 self.binop_test(spamlist([1,2,3]), 2, 1, "b in a", "__contains__")
308 self.binop_test(spamlist([1,2,3]), 4, 0, "b in a", "__contains__")
309 self.binop_test(spamlist([1,2,3]), 1, 2, "a[b]", "__getitem__")
310 self.sliceop_test(spamlist([1,2,3]), 0, 2, spamlist([1,2]), "a[b:c]",
312 self.setop_test(spamlist([1]), spamlist([2]), spamlist([1,2]), "a+=b",
314 self.setop_test(spamlist([1,2]), 3, spamlist([1,2,1,2,1,2]), "a*=b",
316 self.unop_test(spamlist([1,2,3]), 3, "len(a)", "__len__")
317 self.binop_test(spamlist([1,2]), 3, spamlist([1,2,1,2,1,2]), "a*b",
319 self.binop_test(spamlist([1,2]), 3, spamlist([1,2,1,2,1,2]), "b*a",
321 self.set2op_test(spamlist([1,2]), 1, 3, spamlist([1,3]), "a[b]=c",
323 self.setsliceop_test(spamlist([1,2,3,4]), 1, 3, spamlist([5,6]),
324 spamlist([1,5,6,4]), "a[b:c]=d", "__setitem__")
326 class C(spam.spamlist):
1577 x, a1, d1 = spam.spamlist.classmeth(*a, **d)
1578 self.assertEqual(x, spam.spamlist)
1581 x, a1, d1 = spam.spamlist().classmeth(*a, **d)
1582 self.assertEqual(x, spam.spamlist)
1585 spam_cm = spam.spamlist.__dict__['classmeth']
1586 x2, a2, d2 = spam_cm(spam.spamlist, *a, **d)
1587 self.assertEqual(x2, spam.spamlist)
1590 class SubSpam(spam.spamlist): pass
1598 spam_cm(spam.spamlist())
1641 x, a1, d1 = spam.spamlist.staticmeth(*a, **d)
1645 x, a1, d2 = spam.spamlist().staticmeth(*a, **d)