[pypy-svn] r56205 - pypy/dist/pypy/objspace/std/test
arigo at codespeak.net
arigo at codespeak.net
Tue Jul 1 19:03:51 CEST 2008
Author: arigo
Date: Tue Jul 1 19:03:50 2008
New Revision: 56205
Modified:
pypy/dist/pypy/objspace/std/test/test_dictmultiobject.py
Log:
issue383 unread
Test.
Modified: pypy/dist/pypy/objspace/std/test/test_dictmultiobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/test/test_dictmultiobject.py (original)
+++ pypy/dist/pypy/objspace/std/test/test_dictmultiobject.py Tue Jul 1 19:03:50 2008
@@ -31,6 +31,16 @@
def test_emptydict_unhashable(self):
raises(TypeError, "{}[['x']]")
+ def test_string_subclass_via_setattr(self):
+ skip("issue383")
+ class S(str):
+ def __hash__(self):
+ return 123
+ s = S("abc")
+ setattr(s, s, 42)
+ assert s.__dict__.keys()[0] is s
+ assert getattr(s, s) == 42
+
class TestW_DictSharing(test_dictobject.TestW_DictObject):
def setup_class(cls):
More information about the Pypy-commit
mailing list