diff options
author | Michael W. Hudson <mwh@python.net> | 2002-03-11 10:20:04 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-03-11 10:20:04 (GMT) |
commit | fd268a192490b4dbe3d714b97ee9fc9ed871f714 (patch) | |
tree | ecf0c84d334424cdf49cebc6269f54fcd4c7d7d8 | |
parent | 095fbeb55b63d83e8975ec675605709c1ec8d73e (diff) | |
download | cpython-fd268a192490b4dbe3d714b97ee9fc9ed871f714.zip cpython-fd268a192490b4dbe3d714b97ee9fc9ed871f714.tar.gz cpython-fd268a192490b4dbe3d714b97ee9fc9ed871f714.tar.bz2 |
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 *.
-rw-r--r-- | Lib/test/test_descr.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index de9bba1..696e99c 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -426,6 +426,9 @@ def numops(a, b, skip=[]): def ints(): 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(): if verbose: print "Testing long operations..." |