summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-04-15 01:03:30 (GMT)
committerGuido van Rossum <guido@python.org>2002-04-15 01:03:30 (GMT)
commitb6b8942f5302e76178833dc33596b892fef8f85f (patch)
treebde257ab4106418ac00ed521c81e68ff0781004a /Lib/test
parentd1c08f33f2915d101c75c8937806bc27496b3463 (diff)
downloadcpython-b6b8942f5302e76178833dc33596b892fef8f85f.zip
cpython-b6b8942f5302e76178833dc33596b892fef8f85f.tar.gz
cpython-b6b8942f5302e76178833dc33596b892fef8f85f.tar.bz2
SF bug #541883 (Vincent Fiack).
A stupid bug in object_set_class(): didn't check for value==NULL before checking its type. Bugfix candidate.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_descr.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index ab55952..872b7ec 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -2352,6 +2352,12 @@ def setclass():
pass
else:
raise TestFailed, "shouldn't allow %r.__class__ = %r" % (x, C)
+ try:
+ delattr(x, "__class__")
+ except TypeError:
+ pass
+ else:
+ raise TestFailed, "shouldn't allow del %r.__class__" % x
cant(C(), list)
cant(list(), C)
cant(C(), 1)