[pypy-commit] pypy py3k: py3k-ify

antocuni noreply at buildbot.pypy.org
Wed Apr 18 16:01:55 CEST 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r54496:22995c54e8ce
Date: 2012-04-18 12:14 +0200
http://bitbucket.org/pypy/pypy/changeset/22995c54e8ce/

Log:	py3k-ify

diff --git a/pypy/objspace/std/test/test_mapdict.py b/pypy/objspace/std/test/test_mapdict.py
--- a/pypy/objspace/std/test/test_mapdict.py
+++ b/pypy/objspace/std/test/test_mapdict.py
@@ -1014,9 +1014,10 @@
             l = [A(), B(), C()] * 10
             __pypy__.reset_method_cache_counter()
             # 'exec' to make sure that a.f() is compiled with CALL_METHOD
-            exec """for i, a in enumerate(l):
+            d = {'l': l}
+            exec("""for i, a in enumerate(l):
                         assert a.f() == 42 + i % 3
-            """ in locals()
+            """, d)
             cache_counter = __pypy__.mapdict_cache_counter("f")
             if cache_counter == (27, 3):
                 break


More information about the pypy-commit mailing list