[pypy-commit] pypy py3k: py3k{ify,skip} some more tests

antocuni noreply at buildbot.pypy.org
Thu May 31 16:20:38 CEST 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r55235:8e98e1241d41
Date: 2012-05-31 16:06 +0200
http://bitbucket.org/pypy/pypy/changeset/8e98e1241d41/

Log:	py3k{ify,skip} some more tests

diff --git a/pypy/module/_warnings/test/test_warnings.py b/pypy/module/_warnings/test/test_warnings.py
--- a/pypy/module/_warnings/test/test_warnings.py
+++ b/pypy/module/_warnings/test/test_warnings.py
@@ -44,6 +44,7 @@
         warnings.defaultaction = 'default'
 
     def test_show_source_line(self):
+        py3k_skip('fixme later')
         import warnings
         import sys, io
         from test.warning_tests import inner
diff --git a/pypy/module/_weakref/test/test_weakref.py b/pypy/module/_weakref/test/test_weakref.py
--- a/pypy/module/_weakref/test/test_weakref.py
+++ b/pypy/module/_weakref/test/test_weakref.py
@@ -227,16 +227,16 @@
                 yield i
         g = f(10)
         w = _weakref.ref(g)
-        r = w().next()
+        r = next(w())
         assert r == 0
-        r = g.next()
+        r = next(g)
         assert r == 1
         del g
         gc.collect()
         assert w() is None
         g = f(10)
         w = _weakref.ref(g)
-        assert list(g) == range(10)
+        assert list(g) == list(range(10))
         del g
         gc.collect()
         assert w() is None
@@ -398,7 +398,7 @@
                 return 42
             w = getattr(_weakref, kind)(foobaz)
             s = repr(w)
-            print s
+            print(s)
             if kind == 'ref':
                 assert s.startswith('<weakref at ')
             else:
@@ -414,7 +414,7 @@
             except ReferenceError:
                 pass    # only reachable if kind == 'proxy'
             s = repr(w)
-            print s
+            print(s)
             assert "dead" in s
 
     def test_unicode(self):
@@ -422,12 +422,9 @@
         class C(object):
             def __str__(self):
                 return "string"
-            def __unicode__(self):
-                return u"unicode"
         instance = C()
-        assert "__unicode__" in dir(_weakref.proxy(instance))
+        assert "__str__" in dir(_weakref.proxy(instance))
         assert str(_weakref.proxy(instance)) == "string"
-        assert unicode(_weakref.proxy(instance)) == u"unicode"
 
     def test_eq(self):
         import _weakref


More information about the pypy-commit mailing list