Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r52267:ebeed1e0ea4e
Date: 2012-02-09 12:05 +0100
http://bitbucket.org/pypy/pypy/changeset/ebeed1e0ea4e/

Log:    1) fix syntax; 2) we no longer have a long type and a L suffix for
        literals; 3) exec() cannot modify the local scope

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
@@ -721,18 +721,18 @@
         assert ns["x"] == .5
 
     def test_values_of_different_types(self):
-        exec "a = 0; b = 0L; c = 0.0; d = 0j"
-        assert type(a) is int
-        assert type(b) is long
-        assert type(c) is float
-        assert type(d) is complex
+        ns = {}
+        exec("a = 0; c = 0.0; d = 0j", ns)
+        assert type(ns['a']) is int
+        assert type(ns['c']) is float
+        assert type(ns['d']) is complex
 
     def test_values_of_different_types_in_tuples(self):
-        exec "a = ((0,),); b = ((0L,),); c = ((0.0,),); d = ((0j,),)"
-        assert type(a[0][0]) is int
-        assert type(b[0][0]) is long
-        assert type(c[0][0]) is float
-        assert type(d[0][0]) is complex
+        ns = {}
+        exec("a = ((0,),); c = ((0.0,),); d = ((0j,),)", ns)
+        assert type(ns['a'][0][0]) is int
+        assert type(ns['c'][0][0]) is float
+        assert type(ns['d'][0][0]) is complex
 
     def test_zeros_not_mixed(self):
         import math
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to