summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-03-11 13:21:25 (GMT)
committerGuido van Rossum <guido@python.org>2002-03-11 13:21:25 (GMT)
commitc9e9e40b7bc5de0fb6740cb3dd89427ddf60e2cd (patch)
tree0a1d364b23e3627a569d75b055bc4e2f8dd52328 /Lib
parent556a938d107f08a359bd68a2c4b4d4d2f36609b4 (diff)
downloadcpython-c9e9e40b7bc5de0fb6740cb3dd89427ddf60e2cd.zip
cpython-c9e9e40b7bc5de0fb6740cb3dd89427ddf60e2cd.tar.gz
cpython-c9e9e40b7bc5de0fb6740cb3dd89427ddf60e2cd.tar.bz2
Add a check that SF bug 516727 is really fixed.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_descr.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 696e99c..32940eb 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -429,6 +429,16 @@ def ints():
# The following crashes in Python 2.2
vereq((1).__nonzero__(), 1)
vereq((0).__nonzero__(), 0)
+ # This returns 'NotImplemented' in Python 2.2
+ class C(int):
+ def __add__(self, other):
+ return NotImplemented
+ try:
+ C() + ""
+ except TypeError:
+ pass
+ else:
+ raise TestFailed, "NotImplemented should have caused TypeErrpr"
def longs():
if verbose: print "Testing long operations..."