Home | History | Annotate | Download | only in test

Lines Matching refs:spamlist

312         # Testing spamlist operations...
315 def spamlist(l, memo=None):
317 return spam.spamlist(l)
320 copy._deepcopy_dispatch[spam.spamlist] = spamlist
322 self.binop_test(spamlist([1]), spamlist([2]), spamlist([1,2]), "a+b",
324 self.binop_test(spamlist([1,2,3]), 2, 1, "b in a", "__contains__")
325 self.binop_test(spamlist([1,2,3]), 4, 0, "b in a", "__contains__")
326 self.binop_test(spamlist([1,2,3]), 1, 2, "a[b]", "__getitem__")
327 self.ternop_test(spamlist([1,2,3]), 0, 2, spamlist([1,2]), "a[b:c]",
329 self.setop_test(spamlist([1]), spamlist([2]), spamlist([1,2]), "a+=b",
331 self.setop_test(spamlist([1,2]), 3, spamlist([1,2,1,2,1,2]), "a*=b",
333 self.unop_test(spamlist([1,2,3]), 3, "len(a)", "__len__")
334 self.binop_test(spamlist([1,2]), 3, spamlist([1,2,1,2,1,2]), "a*b",
336 self.binop_test(spamlist([1,2]), 3, spamlist([1,2,1,2,1,2]), "b*a",
338 self.set2op_test(spamlist([1,2]), 1, 3, spamlist([1,3]), "a[b]=c",
340 self.set3op_test(spamlist([1,2,3,4]), 1, 3, spamlist([5,6]),
341 spamlist([1,5,6,4]), "a[b:c]=d", "__setslice__")
343 class C(spam.spamlist):
1445 x, a1, d1 = spam.spamlist.classmeth(*a, **d)
1446 self.assertEqual(x, spam.spamlist)
1449 x, a1, d1 = spam.spamlist().classmeth(*a, **d)
1450 self.assertEqual(x, spam.spamlist)
1453 spam_cm = spam.spamlist.__dict__['classmeth']
1454 x2, a2, d2 = spam_cm(spam.spamlist, *a, **d)
1455 self.assertEqual(x2, spam.spamlist)
1458 class SubSpam(spam.spamlist): pass
1466 spam_cm(spam.spamlist())
1508 x, a1, d1 = spam.spamlist.staticmeth(*a, **d)
1512 x, a1, d2 = spam.spamlist().staticmeth(*a, **d)