[pypy-svn] r58725 - pypy/branch/2.5-merge/pypy/objspace/std/test

arigo at codespeak.net arigo at codespeak.net
Tue Oct 7 13:40:51 CEST 2008


Author: arigo
Date: Tue Oct  7 13:40:51 2008
New Revision: 58725

Modified:
   pypy/branch/2.5-merge/pypy/objspace/std/test/test_intobject.py
   pypy/branch/2.5-merge/pypy/objspace/std/test/test_strutil.py
Log:
Check in failing tests (skipped).


Modified: pypy/branch/2.5-merge/pypy/objspace/std/test/test_intobject.py
==============================================================================
--- pypy/branch/2.5-merge/pypy/objspace/std/test/test_intobject.py	(original)
+++ pypy/branch/2.5-merge/pypy/objspace/std/test/test_intobject.py	Tue Oct  7 13:40:51 2008
@@ -1,3 +1,4 @@
+import py
 import sys
 from pypy.objspace.std import intobject as iobj
 from pypy.objspace.std.objspace import FailedToImplement
@@ -321,6 +322,14 @@
         raises(TypeError, int, 1, 10)
         raises(TypeError, int, '5', '9')
 
+    def test_int_largenums(self):
+        py.test.skip("in-progress")
+        import sys
+        for x in [-sys.maxint-1, -1, sys.maxint]:
+            y = int(str(x))
+            assert y == x
+            assert type(y) is int
+
     def test_shift_zeros(self):
         assert (1 << 0) == 1
         assert (1 >> 0) == 1

Modified: pypy/branch/2.5-merge/pypy/objspace/std/test/test_strutil.py
==============================================================================
--- pypy/branch/2.5-merge/pypy/objspace/std/test/test_strutil.py	(original)
+++ pypy/branch/2.5-merge/pypy/objspace/std/test/test_strutil.py	Tue Oct  7 13:40:51 2008
@@ -91,6 +91,13 @@
         raises(ParseStringOverflowError, string_to_int,
                str(sys.maxint*17))
 
+    def test_string_to_int_not_overflow(self):
+        py.test.skip("in-progress")
+        import sys
+        for x in [-sys.maxint-1, sys.maxint]:
+            y = string_to_int(str(x))
+            assert y == x
+
     def test_string_to_int_base_error(self):
         space = self.space
         cases = [('1', 1),



More information about the Pypy-commit mailing list