[pypy-commit] pypy py3k: Fix remaining failures in module/exception
amauryfa
noreply at buildbot.pypy.org
Thu Oct 13 22:40:24 CEST 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
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__')
More information about the pypy-commit
mailing list