Lines Matching refs:Descr
3155 def check(descr, what):
3156 self.assertEqual(descr.__doc__, what)
4162 descr = dict.__dict__["fromkeys"]
4165 self.assertEqual(descr.__get__(None, dict)(arg), res)
4166 self.assertEqual(descr.__get__({})(arg), res)
4170 descr.__get__(None, None)
4174 self.fail("shouldn't have allowed descr.__get__(None, None)")
4176 descr.__get__(42)
4180 self.fail("shouldn't have allowed descr.__get__(42)")
4182 descr.__get__(None, 42)
4186 self.fail("shouldn't have allowed descr.__get__(None, 42)")
4188 descr.__get__(None, int)
4192 self.fail("shouldn't have allowed descr.__get__(None, int)")
4326 class Descr(object):
4331 attr = Descr()
4454 class Descr(object):
4461 descr = Descr("a")
4464 a = descr
4467 self.assertIs(x.a, descr)
4477 Meta.a = Descr("a")
4491 descr = Descriptor()
4493 __getattribute__ = descr
4495 __getattr__ = descr
4497 __getattribute__ = descr
4498 __getattr__ = descr
4501 self.assertEqual(descr.counter, 1)
4503 self.assertEqual(descr.counter, 2)
4505 self.assertEqual(descr.counter, 4)