diff options
author | Guido van Rossum <guido@python.org> | 2001-01-18 21:52:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-01-18 21:52:26 (GMT) |
commit | 4e8db2ed9d767ac0d73f9552f7847b3b32af580c (patch) | |
tree | 5808bf1a3f2e6a1152afdff581fd61d793bbe703 /Lib/test/test_richcmp.py | |
parent | 95695e2fa3d32661c177a724a543c17e9b0baa46 (diff) | |
download | cpython-4e8db2ed9d767ac0d73f9552f7847b3b32af580c.zip cpython-4e8db2ed9d767ac0d73f9552f7847b3b32af580c.tar.gz cpython-4e8db2ed9d767ac0d73f9552f7847b3b32af580c.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_richcmp.py')
-rw-r--r-- | Lib/test/test_richcmp.py | 27 |
1 files 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 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(): |