[pypy-commit] pypy py3k: py3k-ify one test, and skip a py2-only one

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


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

Log:	py3k-ify one test, and skip a py2-only one

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
@@ -815,6 +815,7 @@
         assert res == (0, 1, 0)
 
     def test_old_style_base(self):
+        py.test.skip('py3k no longer has old style classes')
         class B:
             pass
         class C(object):
@@ -896,7 +897,8 @@
             def m(*args):
                 return args
 
-        exec """if 1:
+        d = {'C': C}
+        exec("""if 1:
 
             def f():
                 c = C()
@@ -907,7 +909,8 @@
                 assert res == (c, 1)
                 return 42
 
-        """
+        """, d)
+        f = d['f']
         res = self.check(f, 'm')
         assert res == (1, 1, 1)
         res = self.check(f, 'm')


More information about the pypy-commit mailing list