[Python-checkins] CVS: python/dist/src/Lib/test test_weakref.py,1.12,1.13
Fred L. Drake
fdrake@users.sourceforge.net
Thu, 18 Oct 2001 11:06:08 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv32730/Lib/test
Modified Files:
test_weakref.py
Log Message:
Make sure we do not core dump when using proxies with the binary slot
handlers. This was fixed in Objects/weakrefobject.c 1.2.
Index: test_weakref.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_weakref.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** test_weakref.py 2001/09/20 21:33:42 1.12
--- test_weakref.py 2001/10/18 18:06:05 1.13
***************
*** 217,220 ****
--- 217,228 ----
"list of refs does not match")
+ def test_newstyle_number_ops(self):
+ class F(float):
+ pass
+ f = F(2.0)
+ p = weakref.proxy(f)
+ self.assert_(p + 1.0 == 3.0)
+ self.assert_(1.0 + p == 3.0) # this used to SEGV
+
class Object: