summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_b1.py
diff options
context:
space:
mode:
authorVladimir Marangozov <vladimir.marangozov@t-online.de>2000-07-14 04:32:09 (GMT)
committerVladimir Marangozov <vladimir.marangozov@t-online.de>2000-07-14 04:32:09 (GMT)
commitd57f5cff0ed5896ab717af39805ea06264759b21 (patch)
tree4525cbc694370fbfba80a14d1399d380adf82e82 /Lib/test/test_b1.py
parent374724ed74c013bba808a3d031434983758420d5 (diff)
downloadcpython-d57f5cff0ed5896ab717af39805ea06264759b21.zip
cpython-d57f5cff0ed5896ab717af39805ea06264759b21.tar.gz
cpython-d57f5cff0ed5896ab717af39805ea06264759b21.tar.bz2
Break the cycles after testing cmp() on cyclic objects.
Diffstat (limited to 'Lib/test/test_b1.py')
-rw-r--r--Lib/test/test_b1.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_b1.py b/Lib/test/test_b1.py
index 639a017..d735bfa 100644
--- a/Lib/test/test_b1.py
+++ b/Lib/test/test_b1.py
@@ -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)'