summaryrefslogtreecommitdiff
path: root/Lib/test/test_class.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-09-26 10:37:12 +0000
committerMark Dickinson <dickinsm@gmail.com>2010-09-26 10:37:12 +0000
commitcb61e5d9b59c1a5f18dd34edebb054d1e19f1581 (patch)
treea52fa36e6297747487027f5d2344696a112df566 /Lib/test/test_class.py
parent3eac591a5c33f4bd0bdd60a76053cd3b6b6e5918 (diff)
downloadcpython-git-cb61e5d9b59c1a5f18dd34edebb054d1e19f1581.tar.gz
Issue #9869: Make long() and PyNumber_Long return something of type
long for a class whose __long__ method returns a plain int. This fixes an interpreter crash (due to long_subtype_new assuming PyNumber_Long returns a long) when initializing an instance of a long subclass from an object whose __long__ method returns a plain int.
Diffstat (limited to 'Lib/test/test_class.py')
-rw-r--r--Lib/test/test_class.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py
index 914ea73c40..e7b775250a 100644
--- a/Lib/test/test_class.py
+++ b/Lib/test/test_class.py
@@ -513,7 +513,7 @@ class ClassTests(unittest.TestCase):
callLst[:] = []
as_long = long(mixIntAndLong)
- self.assertEquals(type(as_long), int)
+ self.assertEquals(type(as_long), long)
self.assertEquals(as_long, 64)
self.assertCallStack([('__long__', (mixIntAndLong,))])