[pypy-svn] r58959 - pypy/branch/2.5-merge/pypy/objspace/std/test

arigo at codespeak.net arigo at codespeak.net
Sat Oct 11 12:38:39 CEST 2008


Author: arigo
Date: Sat Oct 11 12:38:38 2008
New Revision: 58959

Modified:
   pypy/branch/2.5-merge/pypy/objspace/std/test/test_dictmultiobject.py
Log:
Make the test slightly less obscure.


Modified: pypy/branch/2.5-merge/pypy/objspace/std/test/test_dictmultiobject.py
==============================================================================
--- pypy/branch/2.5-merge/pypy/objspace/std/test/test_dictmultiobject.py	(original)
+++ pypy/branch/2.5-merge/pypy/objspace/std/test/test_dictmultiobject.py	Sat Oct 11 12:38:38 2008
@@ -33,13 +33,16 @@
 
     def test_string_subclass_via_setattr(self):
         skip("issue383")
+        class A(object):
+            pass
         class S(str):
             def __hash__(self):
                 return 123
+        a = A()
         s = S("abc")
-        setattr(s, s, 42)
-        assert s.__dict__.keys()[0] is s
-        assert getattr(s, s) == 42
+        setattr(a, s, 42)
+        assert a.__dict__.keys()[0] is s
+        assert getattr(a, s) == 42
 
 
 class TestW_DictSharing(test_dictobject.TestW_DictObject):



More information about the Pypy-commit mailing list