summaryrefslogtreecommitdiff
path: root/Lib/test/test_richcmp.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-18 21:52:26 +0000
committerGuido van Rossum <guido@python.org>2001-01-18 21:52:26 +0000
commit4e8db2ed9d767ac0d73f9552f7847b3b32af580c (patch)
tree5808bf1a3f2e6a1152afdff581fd61d793bbe703 /Lib/test/test_richcmp.py
parent95695e2fa3d32661c177a724a543c17e9b0baa46 (diff)
downloadcpython-git-4e8db2ed9d767ac0d73f9552f7847b3b32af580c.tar.gz
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.py27
1 files changed, 10 insertions, 17 deletions
diff --git a/Lib/test/test_richcmp.py b/Lib/test/test_richcmp.py
index 796e698eed..184d6aee62 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():