From 4e8db2ed9d767ac0d73f9552f7847b3b32af580c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 18 Jan 2001 21:52:26 +0000 Subject: 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. --- Lib/test/test_richcmp.py | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/Lib/test/test_richcmp.py b/Lib/test/test_richcmp.py index 796e698..184d6ae 100644 --- a/Lib/test/test_richcmp.py +++ b/Lib/test/test_richcmp.py @@ -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 ab') 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 ab') - check('not a>=b') check('not a==b') - check('cmp(a,b) == -1') if verbose: print "recursion tests ok" def main(): -- cgit v0.12