[pypy-svn] pypy default: (lac looking, arigo)

arigo commits-noreply at bitbucket.org
Tue Jan 18 18:20:14 CET 2011

Author: Armin Rigo <arigo at tunes.org>
Changeset: r40886:02202136058b
Date: 2011-01-18 18:19 +0100

Log:	(lac looking, arigo)

	Start fixing test_builtin: strings containing null characters are
	not special-cased early in pypy.

diff --git a/lib-python/2.7.0/test/test_builtin.py b/lib-python/modified-2.7.0/test/test_builtin.py
copy from lib-python/2.7.0/test/test_builtin.py
copy to lib-python/modified-2.7.0/test/test_builtin.py
--- a/lib-python/2.7.0/test/test_builtin.py
+++ b/lib-python/modified-2.7.0/test/test_builtin.py
@@ -3,7 +3,8 @@
 import platform
 import unittest
 from test.test_support import fcmp, have_unicode, TESTFN, unlink, \
-                              run_unittest, check_py3k_warnings
+                              run_unittest, check_py3k_warnings, \
+                              check_impl_detail
 import warnings
 from operator import neg
@@ -247,12 +248,14 @@
         self.assertRaises(TypeError, compile)
         self.assertRaises(ValueError, compile, 'print 42\n', '<string>', 'badmode')
         self.assertRaises(ValueError, compile, 'print 42\n', '<string>', 'single', 0xff)
-        self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
+        if check_impl_detail(cpython=True):
+            self.assertRaises(TypeError, compile, chr(0), 'f', 'exec')
         self.assertRaises(TypeError, compile, 'pass', '?', 'exec',
                           mode='eval', source='0', filename='tmp')
         if have_unicode:
             compile(unicode('print u"\xc3\xa5"\n', 'utf8'), '', 'exec')
-            self.assertRaises(TypeError, compile, unichr(0), 'f', 'exec')
+            if check_impl_detail(cpython=True):
+                self.assertRaises(TypeError, compile, unichr(0), 'f', 'exec')
             self.assertRaises(ValueError, compile, unicode('a = 1'), 'f', 'bad')

More information about the Pypy-commit mailing list