[Python-3000-checkins] r45812 - python/branches/p3yk/Lib/test/test_compare.py

neal.norwitz python-3000-checkins at python.org
Sun Apr 30 04:31:57 CEST 2006


Author: neal.norwitz
Date: Sun Apr 30 04:31:56 2006
New Revision: 45812

Modified:
   python/branches/p3yk/Lib/test/test_compare.py
Log:
__coerce__ is gone, there's nothing to test.  
This test now passes after removing refs to __coerce__.


Modified: python/branches/p3yk/Lib/test/test_compare.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_compare.py	(original)
+++ python/branches/p3yk/Lib/test/test_compare.py	Sun Apr 30 04:31:56 2006
@@ -6,19 +6,6 @@
     def __repr__(self):
         return '<Empty>'
 
-class Coerce:
-    def __init__(self, arg):
-        self.arg = arg
-
-    def __repr__(self):
-        return '<Coerce %s>' % self.arg
-
-    def __coerce__(self, other):
-        if isinstance(other, Coerce):
-            return self.arg, other.arg
-        else:
-            return self.arg, other
-
 class Cmp:
     def __init__(self,arg):
         self.arg = arg
@@ -30,7 +17,7 @@
         return cmp(self.arg, other)
 
 class ComparisonTest(unittest.TestCase):
-    set1 = [2, 2.0, 2L, 2+0j, Coerce(2), Cmp(2.0)]
+    set1 = [2, 2.0, 2L, 2+0j, Cmp(2.0)]
     set2 = [[1], (3,), None, Empty()]
     candidates = set1 + set2
 


More information about the Python-3000-checkins mailing list