summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-15 06:35:55 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-15 06:35:55 (GMT)
commite0007821cd2b8db1ecde561929f685bb356d0209 (patch)
tree5cb8661f5bae70a8f4307a002cf84fc895058d82 /Lib
parent7e35d57c0cd94b136d613129cb22a2b4252aa008 (diff)
downloadcpython-e0007821cd2b8db1ecde561929f685bb356d0209.zip
cpython-e0007821cd2b8db1ecde561929f685bb356d0209.tar.gz
cpython-e0007821cd2b8db1ecde561929f685bb356d0209.tar.bz2
Since we had a bug with multiplication of dynamic long subclasses, add a
little test to make sure it doesn't come back.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_descr.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 3b3a34e..401489d 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -901,13 +901,18 @@ def dynamics():
__dynamic__ = 1
verify("a"*I(2) == "aa")
verify(I(2)*"a" == "aa")
+ verify(2*I(3) == 6)
+ verify(I(3)*2 == 6)
+ verify(I(3)*I(2) == 6)
# Test handling of long*seq and seq*long
class L(long):
__dynamic__ = 1
verify("a"*L(2L) == "aa")
verify(L(2L)*"a" == "aa")
-
+ verify(2*L(3) == 6)
+ verify(L(3)*2 == 6)
+ verify(L(3)*L(2) == 6)
def errors():
if verbose: print "Testing errors..."