[pypy-svn] r59977 - pypy/trunk/lib-python/modified-2.5.2/test

iko at codespeak.net iko at codespeak.net
Tue Nov 18 03:02:20 CET 2008


Author: iko
Date: Tue Nov 18 03:02:19 2008
New Revision: 59977

Added:
   pypy/trunk/lib-python/modified-2.5.2/test/test_sets.py   (contents, props changed)
      - copied, changed from r59912, pypy/trunk/lib-python/2.5.2/test/test_sets.py
Log:
string objects are not preserved when used as keys in pypy dicts



Copied: pypy/trunk/lib-python/modified-2.5.2/test/test_sets.py (from r59912, pypy/trunk/lib-python/2.5.2/test/test_sets.py)
==============================================================================
--- pypy/trunk/lib-python/2.5.2/test/test_sets.py	(original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_sets.py	Tue Nov 18 03:02:19 2008
@@ -700,7 +700,13 @@
 
 class TestCopyingSingleton(TestCopying):
     def setUp(self):
-        self.set = Set(["hello"])
+        class testobj(object):
+            def __init__(self, val):
+                self.val = val
+            def __eq__(self, other):
+                return self.val == other.val
+
+        self.set = Set([testobj(42)])
 
 #------------------------------------------------------------------------------
 



More information about the Pypy-commit mailing list