Lines Matching refs:ref1
120 ref1 = weakref.ref(o, self.callback)
123 self.assertIsNone(ref1(), "expected reference to be invalidated")
143 ref1 = weakref.ref(c, callback)
153 ref1 = weakref.proxy(o, self.callback)
160 self.assertRaises(weakref.ReferenceError, check, ref1)
186 ref1 = weakref.ref(o)
191 self.assertIs(ref1, ref2,
196 ref1 = weakref.ref(o)
198 self.assertIs(ref1, ref2,
309 ref1 = weakref.proxy(o)
311 self.check_proxy(o, ref1)
313 self.assertIs(type(ref1), weakref.CallableProxyType,
315 ref1('twinkies!')
318 ref1(x='Splat.')
323 self.assertRaises(TypeError, ref1)
326 self.assertRaises(TypeError, ref1, 1, 2, 3)
368 ref1 = weakref.ref(o)
378 del ref1, ref2, proxy1, proxy2
389 ref1 = weakref.ref(o, self.callback)
391 del ref1
396 ref1 = weakref.ref(o, self.callback)
399 self.assertEqual(weakref.getweakrefs(o), [ref1],
402 del ref1