Commit 344c052e authored by Tim Peters's avatar Tim Peters

Enable some comparison tests that failed before. Still having problems

with subsclasses of complex and string.
parent ba141aad
...@@ -1416,7 +1416,7 @@ def inherits(): ...@@ -1416,7 +1416,7 @@ def inherits():
verify(repr(hexint(7) + 9) == "0x10") verify(repr(hexint(7) + 9) == "0x10")
verify(repr(hexint(1000) + 7) == "0x3ef") verify(repr(hexint(1000) + 7) == "0x3ef")
a = hexint(12345) a = hexint(12345)
#XXX verify(a == 12345) verify(a == 12345)
verify(int(a) == 12345) verify(int(a) == 12345)
verify(int(a).__class__ is int) verify(int(a).__class__ is int)
verify(hash(a) == hash(12345)) verify(hash(a) == hash(12345))
...@@ -1441,7 +1441,7 @@ def inherits(): ...@@ -1441,7 +1441,7 @@ def inherits():
# because the example uses a short int left argument.) # because the example uses a short int left argument.)
verify(str(5 + octlong(3000)) == "05675") verify(str(5 + octlong(3000)) == "05675")
a = octlong(12345) a = octlong(12345)
#XXX verify(a == 12345L) verify(a == 12345L)
verify(long(a) == 12345L) verify(long(a) == 12345L)
verify(hash(a) == hash(12345L)) verify(hash(a) == hash(12345L))
verify(long(a).__class__ is long) verify(long(a).__class__ is long)
...@@ -1479,7 +1479,7 @@ def inherits(): ...@@ -1479,7 +1479,7 @@ def inherits():
return "%.*g" % (self.prec, self) return "%.*g" % (self.prec, self)
verify(repr(precfloat(1.1)) == "1.1") verify(repr(precfloat(1.1)) == "1.1")
a = precfloat(12345) a = precfloat(12345)
#XXX verify(a == 12345.0) verify(a == 12345.0)
verify(float(a) == 12345.0) verify(float(a) == 12345.0)
verify(float(a).__class__ is float) verify(float(a).__class__ is float)
verify(hash(a) == hash(12345.0)) verify(hash(a) == hash(12345.0))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment