[pypy-svn] pypy default: Implementation details.

arigo commits-noreply at bitbucket.org
Sun Feb 13 11:34:03 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r41871:5764d30e2086
Date: 2011-02-13 11:33 +0100
http://bitbucket.org/pypy/pypy/changeset/5764d30e2086/

Log:	Implementation details.

diff --git a/lib-python/2.7.0/test/test_types.py b/lib-python/modified-2.7.0/test/test_types.py
copy from lib-python/2.7.0/test/test_types.py
copy to lib-python/modified-2.7.0/test/test_types.py
--- a/lib-python/2.7.0/test/test_types.py
+++ b/lib-python/modified-2.7.0/test/test_types.py
@@ -1,7 +1,8 @@
 # Python test set -- part 6, built-in types
 
 from test.test_support import run_unittest, have_unicode, run_with_locale, \
-                              check_py3k_warnings
+                              check_py3k_warnings, \
+                              impl_detail, check_impl_detail
 import unittest
 import sys
 import locale
@@ -289,9 +290,14 @@
         # array.array() returns an object that does not implement a char buffer,
         # something which int() uses for conversion.
         import array
-        try: int(buffer(array.array('c')))
+        try: int(buffer(array.array('c', '5')))
         except TypeError: pass
-        else: self.fail("char buffer (at C level) not working")
+        else:
+            if check_impl_detail():
+                self.fail("char buffer (at C level) not working")
+            #else:
+            #   it works on PyPy, which does not have the distinction
+            #   between char buffer and binary buffer.  XXX fine enough?
 
     def test_int__format__(self):
         def test(i, format_spec, result):
@@ -741,6 +747,7 @@
         for code in 'xXobns':
             self.assertRaises(ValueError, format, 0, ',' + code)
 
+    @impl_detail("the types' internal size attributes are CPython-only")
     def test_internal_sizes(self):
         self.assertGreater(object.__basicsize__, 0)
         self.assertGreater(tuple.__itemsize__, 0)


More information about the Pypy-commit mailing list