[Python-checkins] python/dist/src/Lib/test test_descr.py,1.128,1.129
gvanrossum@sourceforge.net
gvanrossum@sourceforge.net
Sun, 14 Apr 2002 18:03:33 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv696
Modified Files:
test_descr.py
Log Message:
SF bug #541883 (Vincent Fiack).
A stupid bug in object_set_class(): didn't check for value==NULL
before checking its type.
Bugfix candidate.
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.128
retrieving revision 1.129
diff -C2 -d -r1.128 -r1.129
*** test_descr.py 6 Apr 2002 01:05:01 -0000 1.128
--- test_descr.py 15 Apr 2002 01:03:30 -0000 1.129
***************
*** 2353,2356 ****
--- 2353,2362 ----
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)