Break the cycles after testing cmp() on cyclic objects.
authorVladimir Marangozov <vladimir.marangozov@t-online.de>
Fri, 14 Jul 2000 04:32:09 +0000 (04:32 +0000)
committerVladimir Marangozov <vladimir.marangozov@t-online.de>
Fri, 14 Jul 2000 04:32:09 +0000 (04:32 +0000)
Lib/test/test_b1.py

index 639a01776dc4c3113ba38e98f3cf729f5c15a71c..d735bfa5dca60796cdf2e537d43e24a107687979 100644 (file)
@@ -72,6 +72,8 @@ if cmp(a, b) != 0: raise TestFailed, "cmp(%s, %s)" % (a, b)
 if cmp(b, c) != 0: raise TestFailed, "cmp(%s, %s)" % (b, c)
 if cmp(c, a) != 0: raise TestFailed, "cmp(%s, %s)" % (c, a)
 if cmp(a, c) != 0: raise TestFailed, "cmp(%s, %s)" % (a, c)
+# okay, now break the cycles
+a.pop(); b.pop(); c.pop()
 
 print 'coerce'
 if fcmp(coerce(1, 1.1), (1.0, 1.1)): raise TestFailed, 'coerce(1, 1.1)'