mirror of https://github.com/python/cpython
Since I'm about to check in a change to the recursion-detection code
for comparisons that outlaws requets for ordering on recursive data structures, remove the tests for ordering recursive data structures.
This commit is contained in:
parent
95695e2fa3
commit
4e8db2ed9d
|
@ -194,38 +194,31 @@ def recursion():
|
|||
b = UserList(); b.append(b)
|
||||
def check(s, a=a, b=b):
|
||||
if verbose:
|
||||
print "trying", s, "..."
|
||||
verify(eval(s))
|
||||
print "check", s
|
||||
try:
|
||||
if not eval(s):
|
||||
raise TestFailed, s + " was false but expected to be true"
|
||||
except RuntimeError, msg:
|
||||
raise TestFailed, str(msg)
|
||||
if verbose:
|
||||
print "recursion tests: a=%s, b=%s" % (a, b)
|
||||
check('a==b')
|
||||
check('a<=b')
|
||||
check('a>=b')
|
||||
check('not a<b')
|
||||
check('not a>b')
|
||||
check('not a!=b')
|
||||
check('cmp(a,b) == 0')
|
||||
a.append(1)
|
||||
if verbose:
|
||||
print "recursion tests: a=%s, b=%s" % (a, b)
|
||||
check('a!=b')
|
||||
check('not a==b')
|
||||
b.append(0)
|
||||
if verbose:
|
||||
print "recursion tests: a=%s, b=%s" % (a, b)
|
||||
check('a>b')
|
||||
check('a>=b')
|
||||
check('a!=b')
|
||||
check('not a<b')
|
||||
check('not a<=b')
|
||||
check('not a==b')
|
||||
check('cmp(a,b) == 1')
|
||||
a[1] = -1
|
||||
if verbose:
|
||||
print "recursion tests: a=%s, b=%s" % (a, b)
|
||||
check('a<b')
|
||||
check('a<=b')
|
||||
check('a!=b')
|
||||
check('not a>b')
|
||||
check('not a>=b')
|
||||
check('not a==b')
|
||||
check('cmp(a,b) == -1')
|
||||
if verbose: print "recursion tests ok"
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Reference in New Issue