summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_augassign.py
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-04-15 09:10:43 (GMT)
committerThomas Wouters <thomas@python.org>2006-04-15 09:10:43 (GMT)
commit34729030a741bcbc469ce0e796182f85405a9b3d (patch)
tree933e302b5f7aa87b55c1b35b7006a3e2948b9e7c /Lib/test/test_augassign.py
parent8690c4ed3fa1f1889459249c7e50e11c2052b340 (diff)
downloadcpython-34729030a741bcbc469ce0e796182f85405a9b3d.zip
cpython-34729030a741bcbc469ce0e796182f85405a9b3d.tar.gz
cpython-34729030a741bcbc469ce0e796182f85405a9b3d.tar.bz2
Fix the superficial augmented-assignment tests to deal with true division.
Add (equally superficial) >>=/<<= test in the process. Relies on floats that should be extremely close to the int '6' printing as '6.0', but I believe that's a valid assumption ;P
Diffstat (limited to 'Lib/test/test_augassign.py')
-rw-r--r--Lib/test/test_augassign.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/Lib/test/test_augassign.py b/Lib/test/test_augassign.py
index 228e03a..22cca44 100644
--- a/Lib/test/test_augassign.py
+++ b/Lib/test/test_augassign.py
@@ -5,42 +5,51 @@ x += 1
x *= 2
x **= 2
x -= 8
-x /= 2
-x //= 1
x %= 12
+x >>= 1
x &= 2
x |= 5
x ^= 1
+x <<= 2
+x /= 2
+x //= 2
print x
+print int(x)
x = [2]
x[0] += 1
x[0] *= 2
x[0] **= 2
x[0] -= 8
-x[0] /= 2
-x[0] //= 2
x[0] %= 12
+x[0] >>= 1
x[0] &= 2
x[0] |= 5
x[0] ^= 1
+x[0] <<= 2
+x[0] /= 2
+x[0] //= 2
print x
+print int(x[0])
x = {0: 2}
x[0] += 1
x[0] *= 2
x[0] **= 2
x[0] -= 8
-x[0] /= 2
-x[0] //= 1
x[0] %= 12
+x[0] >>= 1
x[0] &= 2
x[0] |= 5
x[0] ^= 1
+x[0] <<= 2
+x[0] /= 2
+x[0] //= 2
print x[0]
+print int(x[0])
x = [1,2]
x += [3,4]