[Python-checkins] cpython (merge 3.2 -> 3.3): Issue #16792: Mark small ints test as CPython-only.

serhiy.storchaka python-checkins at python.org
Thu Dec 27 23:22:49 CET 2012


http://hg.python.org/cpython/rev/dee82e66726d
changeset:   81107:dee82e66726d
branch:      3.3
parent:      81103:f98ab0d3a591
parent:      81106:31955234b624
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Fri Dec 28 00:16:53 2012 +0200
summary:
  Issue #16792: Mark small ints test as CPython-only.

files:
  Lib/test/test_int.py |  12 ++++++++----
  1 files changed, 8 insertions(+), 4 deletions(-)


diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py
--- a/Lib/test/test_int.py
+++ b/Lib/test/test_int.py
@@ -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
@@ -221,6 +217,14 @@
         self.assertEqual(int('2br45qc', 35), 4294967297)
         self.assertEqual(int('1z141z5', 36), 4294967297)
 
+    @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_no_args(self):
         self.assertEquals(int(), 0)
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list