summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_descr.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-11 21:44:14 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-11 21:44:14 (GMT)
commit73a1dfe3674429f923e98b84ef01df1614baad2f (patch)
tree9af64d22a0bdc3b3b77d7c704cfcda6c098b58b7 /Lib/test/test_descr.py
parent95fefc7a7a7d3c732b9b2a2102ced3bcc7859cda (diff)
downloadcpython-73a1dfe3674429f923e98b84ef01df1614baad2f.zip
cpython-73a1dfe3674429f923e98b84ef01df1614baad2f.tar.gz
cpython-73a1dfe3674429f923e98b84ef01df1614baad2f.tar.bz2
More bug 460020. When I is a subclass of int, disable the +I(whatever),
I(0) << whatever, I(0) >> whatever, I(whatever) << 0 and I(whatever) >> 0 optimizations.
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r--Lib/test/test_descr.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 5c4db30..e89f642 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1366,6 +1366,11 @@ def inherits():
a = hexint(12345)
verify(int(a) == 12345)
verify(int(a).__class__ is int)
+ verify((+a).__class__ is int)
+ verify((a >> 0).__class__ is int)
+ verify((a << 0).__class__ is int)
+ verify((hexint(0) << 12).__class__ is int)
+ verify((hexint(0) >> 12).__class__ is int)
class octlong(long):
__slots__ = []