[pypy-commit] pypy py3k: we no longer need to import print_function from __future__. Also, s/__builtin__/builtins
antocuni
noreply at buildbot.pypy.org
Fri Jan 27 20:29:14 CET 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r51871:7586f1183218
Date: 2012-01-27 11:51 +0100
http://bitbucket.org/pypy/pypy/changeset/7586f1183218/
Log: we no longer need to import print_function from __future__. Also,
s/__builtin__/builtins
diff --git a/pypy/interpreter/test/test_syntax.py b/pypy/interpreter/test/test_syntax.py
--- a/pypy/interpreter/test/test_syntax.py
+++ b/pypy/interpreter/test/test_syntax.py
@@ -238,13 +238,13 @@
class AppTestPrintFunction:
def test_simple_print(self):
- import __builtin__
- s = """from __future__ import print_function
-x = print
-"""
+ """
+ import builtins
+ s = "x = print"
ns = {}
exec(s, ns)
- assert ns["x"] is getattr(__builtin__, "print")
+ assert ns["x"] is builtins.print
+ """
def test_print(self):
s = """from __future__ import print_function
More information about the pypy-commit
mailing list