Lines Matching defs:spam
306 import copy, xxsubtype as spam
309 import xxsubtype as spam
310 return spam.spamlist(l)
313 copy._deepcopy_dispatch[spam.spamlist] = spamlist
336 class C(spam.spamlist):
350 import copy, xxsubtype as spam
352 import xxsubtype as spam
353 sd = spam.spamdict()
358 copy._deepcopy_dispatch[spam.spamdict] = spamdict
388 class C(spam.spamdict):
517 def spam(self):
521 self.assertIn('spam', C.dict)
523 self.assertEqual(c.spam(), 42)
813 def spam(self): return "A"
814 self.assertEqual(A().spam(), "A")
817 def spam(self): return "B"
818 self.assertEqual(B().spam(), "B")
822 self.assertEqual(C().spam(), "A")
825 self.assertEqual(D().spam(), "B")
829 self.assertEqual(E().spam(), "B")
1254 self.assertFalse(hasattr(a, "spam"))
1256 if name == "spam":
1257 return "spam"
1260 self.assertEqual(a.spam, "spam")
1264 if name == "spam":
1269 a.spam = "not spam"
1274 self.assertEqual(a.spam, "spam")
1411 import xxsubtype as spam
1414 x, a1, d1 = spam.spamlist.classmeth(*a, **d)
1415 self.assertEqual(x, spam.spamlist)
1418 x, a1, d1 = spam.spamlist().classmeth(*a, **d)
1419 self.assertEqual(x, spam.spamlist)
1422 spam_cm = spam.spamlist.__dict__['classmeth']
1423 x2, a2, d2 = spam_cm(spam.spamlist, *a, **d)
1424 self.assertEqual(x2, spam.spamlist)
1427 class SubSpam(spam.spamlist): pass
1435 spam_cm(spam.spamlist())
1459 import xxsubtype as spam
1462 x, a1, d1 = spam.spamlist.staticmeth(*a, **d)
1466 x, a1, d2 = spam.spamlist().staticmeth(*a, **d)
3191 class_dict["spam"] = "eggs"
3203 mod = ModuleType("spam")
3205 mod.__dict__["spam"] = "eggs"
3498 if name in ("spam", "foo", "bar"):
3502 self.assertEqual(d.spam, "hello")