Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r48030:9824a8b7789a
Date: 2011-10-13 22:38 +0200
http://bitbucket.org/pypy/pypy/changeset/9824a8b7789a/

Log:    Fix remaining failures in module/exception

diff --git a/pypy/module/exceptions/test/test_exc.py 
b/pypy/module/exceptions/test/test_exc.py
--- a/pypy/module/exceptions/test/test_exc.py
+++ b/pypy/module/exceptions/test/test_exc.py
@@ -152,8 +152,8 @@
         assert ud.reason == 'bah'
         assert ud.args == ('x', b'y', 1, 5, 'bah')
         assert ud.message == ''
-        ud.object = 'z9'
-        assert ud.object == 'z9'
+        ud.object = b'z9'
+        assert ud.object == b'z9'
         assert str(ud) == "'x' codec can't decode bytes in position 1-4: bah"
         ud.end = 2
         assert str(ud) == "'x' codec can't decode byte 0x39 in position 1: bah"
diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -512,7 +512,7 @@
             # hack...
             if ('__module__' in w_self.dict_w and
                 space.isinstance_w(w_self.getdictvalue(space, '__module__'),
-                                               space.w_str)):
+                                               space.w_unicode)):
                 return w_self.getdictvalue(space, '__module__')
             return space.wrap('__builtin__')
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to