[Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.40,1.41
Tim Peters
tim_one@users.sourceforge.net
Tue, 11 Sep 2001 12:48:05 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv901/python/Lib/test
Modified Files:
test_descr.py
Log Message:
The endless 460020 bug.
Disable t[:], t*0, t*1 optimizations when t is of a tuple subclass type.
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** test_descr.py 2001/09/11 14:02:22 1.40
--- test_descr.py 2001/09/11 19:48:03 1.41
***************
*** 1418,1424 ****
--- 1418,1433 ----
verify(tuple(a) == (1,2,3,4,5))
verify(tuple(a).__class__ is tuple)
+ verify(a[:].__class__ is tuple)
+ verify((a * 1).__class__ is tuple)
+ verify((a * 0).__class__ is tuple)
+ verify((a + ()).__class__ is tuple)
a = madtuple(())
verify(tuple(a) == ())
verify(tuple(a).__class__ is tuple)
+ verify((a + a).__class__ is tuple)
+ verify((a * 0).__class__ is tuple)
+ verify((a * 1).__class__ is tuple)
+ verify((a * 2).__class__ is tuple)
+ verify(a[:].__class__ is tuple)
class madstring(str):