[Python-checkins] python/dist/src/Lib/test test_weakref.py, 1.42,
1.43
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Sun Mar 27 05:04:56 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6538/Lib/test
Modified Files:
test_weakref.py
Log Message:
SF bug #1770766: weakref proxy has incorrect __nonzero__ behavior.
Index: test_weakref.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_weakref.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- test_weakref.py 8 Jul 2004 01:22:31 -0000 1.42
+++ test_weakref.py 27 Mar 2005 03:04:53 -0000 1.43
@@ -271,6 +271,12 @@
del f[0]
self.assertEqual(f.result, 0)
+ def test_proxy_bool(self):
+ # Test clearing of SF bug #1170766
+ class List(list): pass
+ lyst = List()
+ self.assertEqual(bool(weakref.proxy(lyst)), bool(lyst))
+
def test_getweakrefcount(self):
o = C()
ref1 = weakref.ref(o)
More information about the Python-checkins
mailing list