diff -r 517f3432d1b5 Lib/test/test_int.py --- a/Lib/test/test_int.py Tue Dec 25 15:27:56 2012 -0800 +++ b/Lib/test/test_int.py Wed Dec 26 17:42:34 2012 +0200 @@ -100,10 +100,6 @@ self.assertRaises(ValueError, int, "0b", 2) self.assertRaises(ValueError, int, "0b", 0) - # Bug #3236: Return small longs from PyLong_FromString - self.assertTrue(int("10") is 10) - self.assertTrue(int("-1") is -1) - # SF bug 1334662: int(string, base) wrong answers # Various representations of 2**32 evaluated to 0 # rather than 2**32 in previous versions @@ -261,6 +257,14 @@ def test_string_float(self): self.assertRaises(ValueError, int, '1.2') + @support.cpython_only + def test_small_ints(self): + # Bug #3236: Return small longs from PyLong_FromString + self.assertIs(int('10'), 10) + self.assertIs(int('-1'), -1) + self.assertIs(int(b'10'), 10) + self.assertIs(int(b'-1'), -1) + def test_intconversion(self): # Test __int__() class ClassicMissingMethods: