mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Break the cycles after testing cmp() on cyclic objects.
This commit is contained in:
parent
374724ed74
commit
d57f5cff0e
1 changed files with 2 additions and 0 deletions
|
@ -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)'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue