[Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.113.4.3,1.113.4.4
Michael Hudson
mwh@users.sourceforge.net
Mon, 11 Mar 2002 02:20:06 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv5606
Modified Files:
Tag: release22-maint
test_descr.py
Log Message:
backport gvanrossum's checkin of
revision 1.117 of test_descr.py
Bugfix candidate.
Adapter from SF patch 528038; fixes SF bug 527816.
The wrapper for __nonzero__ should be wrap_inquiry rather than
wrap_unaryfunc, since the slot returns an int, not a PyObject *.
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.113.4.3
retrieving revision 1.113.4.4
diff -C2 -d -r1.113.4.3 -r1.113.4.4
*** test_descr.py 5 Mar 2002 15:38:43 -0000 1.113.4.3
--- test_descr.py 11 Mar 2002 10:20:04 -0000 1.113.4.4
***************
*** 427,430 ****
--- 427,433 ----
if verbose: print "Testing int operations..."
numops(100, 3)
+ # The following crashes in Python 2.2
+ vereq((1).__nonzero__(), 1)
+ vereq((0).__nonzero__(), 0)
def longs():