Lines Matching refs:Descr
3167 def check(descr, what):
3168 self.assertEqual(descr.__doc__, what)
4419 descr = dict.__dict__["fromkeys"]
4422 self.assertEqual(descr.__get__(None, dict)(arg), res)
4423 self.assertEqual(descr.__get__({})(arg), res)
4427 descr.__get__(None, None)
4431 self.fail("shouldn't have allowed descr.__get__(None, None)")
4433 descr.__get__(42)
4437 self.fail("shouldn't have allowed descr.__get__(42)")
4439 descr.__get__(None, 42)
4443 self.fail("shouldn't have allowed descr.__get__(None, 42)")
4445 descr.__get__(None, int)
4449 self.fail("shouldn't have allowed descr.__get__(None, int)")
4583 class Descr(object):
4588 attr = Descr()
4725 class Descr(object):
4732 descr = Descr("a")
4735 a = descr
4738 self.assertIs(x.a, descr)
4748 Meta.a = Descr("a")
4762 descr = Descriptor()
4764 __getattribute__ = descr
4766 __getattr__ = descr
4768 __getattribute__ = descr
4769 __getattr__ = descr
4772 self.assertEqual(descr.counter, 1)
4774 self.assertEqual(descr.counter, 2)
4776 self.assertEqual(descr.counter, 4)