]> granicus.if.org Git - python/commitdiff
Deviant1 didn't work as advertised
authorJeremy Hylton <jeremy@alum.mit.edu>
Thu, 27 Apr 2000 21:42:48 +0000 (21:42 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Thu, 27 Apr 2000 21:42:48 +0000 (21:42 +0000)
Lib/test/test_contains.py

index 715fbbf09cc55118a4139ed43bf3574a6899a89f..355135f01d58a8e4b93232cf64263e4d2ee78b64 100644 (file)
@@ -140,13 +140,13 @@ class Deviant1:
        works when the list is modified during the check.
        """
 
-       aLongList = range(15)
-       aShortList = range(5)
-       aList = aLongList
+       aList = range(15)
        
        def __cmp__(self, other):
                if other == 12:
-                       self.aList = self.aShortList
+                       self.aList.remove(12)
+                       self.aList.remove(13)
+                       self.aList.remove(14)
                return 1
 
 check(Deviant1() not in Deviant1.aList, "Deviant1 failed")