diff options
author | Guido van Rossum <guido@python.org> | 2002-03-11 00:07:13 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2002-03-11 00:07:13 (GMT) |
commit | 15d529aec52276fe4df83aeda5b01e8df77344dc (patch) | |
tree | cb95fdfc0f15658249d4402c64d1f1269195f03a | |
parent | a2168eceb0277f767877a0845537f6564f0410a0 (diff) | |
download | cpython-15d529aec52276fe4df83aeda5b01e8df77344dc.zip cpython-15d529aec52276fe4df83aeda5b01e8df77344dc.tar.gz cpython-15d529aec52276fe4df83aeda5b01e8df77344dc.tar.bz2 |
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..." |