[pypy-commit] pypy py3k: fix the syntax, and make sure that we use bytestring, because we are talking about the encoded data here (thanks to G2P for the pointer)

antocuni noreply at buildbot.pypy.org
Thu Feb 9 12:02:46 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r52266:d8007b59c678
Date: 2012-02-09 12:02 +0100
http://bitbucket.org/pypy/pypy/changeset/d8007b59c678/

Log:	fix the syntax, and make sure that we use bytestring, because we are
	talking about the encoded data here (thanks to G2P for the pointer)

diff --git a/pypy/interpreter/test/test_compiler.py b/pypy/interpreter/test/test_compiler.py
--- a/pypy/interpreter/test/test_compiler.py
+++ b/pypy/interpreter/test/test_compiler.py
@@ -715,9 +715,9 @@
 class AppTestCompiler:
 
     def test_bom_with_future(self):
-        s = '\xef\xbb\xbffrom __future__ import division\nx = 1/2'
+        s = b'\xef\xbb\xbffrom __future__ import division\nx = 1/2'
         ns = {}
-        exec s in ns
+        exec(s, ns)
         assert ns["x"] == .5
 
     def test_values_of_different_types(self):


More information about the pypy-commit mailing list