[Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.116,1.117

Guido van Rossum gvanrossum@users.sourceforge.net
Sun, 10 Mar 2002 16:07:15 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv4829

Modified Files:
	test_descr.py 
Log Message:
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.116
retrieving revision 1.117
diff -C2 -d -r1.116 -r1.117
*** test_descr.py	2 Mar 2002 04:18:04 -0000	1.116
--- test_descr.py	11 Mar 2002 00:07:13 -0000	1.117
***************
*** 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():