summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-09-19 01:16:16 (GMT)
committerGuido van Rossum <guido@python.org>2001-09-19 01:16:16 (GMT)
commitd5d8e4a43632d9d4ec9f6fb23f7405c4f0678617 (patch)
treef4027de5b1538374dd338f64b925ac7931b02474 /Lib
parent638059603ca96a1e9b6d05f4d5c51a06a17b63ec (diff)
downloadcpython-d5d8e4a43632d9d4ec9f6fb23f7405c4f0678617.zip
cpython-d5d8e4a43632d9d4ec9f6fb23f7405c4f0678617.tar.gz
cpython-d5d8e4a43632d9d4ec9f6fb23f7405c4f0678617.tar.bz2
Enable two checks for comparing a complex to a complex subtype
instance. Split a string comparison test in two halves, replacing "a==b==a" with separate tests for a==b and b==a. (Reason: while experimenting, this test failed, and I wanted to know if it was the first or the second == operator that failed.)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_descr.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 2cd16c6..a57471b 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1492,12 +1492,12 @@ def inherits():
verify(repr(a) == "4j-3")
base = complex(-3, 4)
verify(base.__class__ is complex)
- #XXX verify(a == base)
+ verify(a == base)
verify(complex(a) == base)
verify(complex(a).__class__ is complex)
a = madcomplex(a) # just trying another form of the constructor
verify(repr(a) == "4j-3")
- #XXX verify(a == base)
+ verify(a == base)
verify(complex(a) == base)
verify(complex(a).__class__ is complex)
verify(hash(a) == hash(base))
@@ -1821,7 +1821,8 @@ def str_subclass_as_dict_key():
def __hash__(self):
return self.hashcode
- verify('aBc' == cistr('ABC') == 'abc')
+ verify(cistr('ABC') == 'abc')
+ verify('aBc' == cistr('ABC'))
verify(str(cistr('ABC')) == 'ABC')
d = {cistr('one'): 1, cistr('two'): 2, cistr('tHree'): 3}