[pypy-commit] pypy unicode-utf8-py3: fix remaining failing tests

cfbolz pypy.commits at gmail.com
Fri Jan 25 09:00:11 EST 2019


Author: Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>
Branch: unicode-utf8-py3
Changeset: r95722:b37c4fff34a0
Date: 2019-01-25 14:55 +0100
http://bitbucket.org/pypy/pypy/changeset/b37c4fff34a0/

Log:	fix remaining failing tests

diff --git a/pypy/objspace/std/mapdict.py b/pypy/objspace/std/mapdict.py
--- a/pypy/objspace/std/mapdict.py
+++ b/pypy/objspace/std/mapdict.py
@@ -433,8 +433,8 @@
     def materialize_str_dict(self, space, obj, str_dict):
         new_obj = self.back.materialize_str_dict(space, obj, str_dict)
         if self.index == DICT:
-            uni_name = str_decode_utf8(self.name, "string", True, None)[0]
-            str_dict[uni_name] = obj._mapdict_read_storage(self.storageindex)
+            w_key = space.newtext(self.name)
+            str_dict[w_key] = obj._mapdict_read_storage(self.storageindex)
         else:
             self._copy_attr(obj, new_obj)
         return new_obj
diff --git a/pypy/objspace/std/test/test_kwargsdict.py b/pypy/objspace/std/test/test_kwargsdict.py
--- a/pypy/objspace/std/test/test_kwargsdict.py
+++ b/pypy/objspace/std/test/test_kwargsdict.py
@@ -82,7 +82,7 @@
     for i in range(100):
         assert d.setitem_str("ה%s" % i, 4) is None
     assert d.get_strategy() is not strategy
-    assert "ObjectDictStrategy" == d.get_strategy().__class__.__name__
+    assert "UnicodeDictStrategy" == d.get_strategy().__class__.__name__
 
 def test_keys_doesnt_wrap():
     space = FakeSpace()


More information about the pypy-commit mailing list