[Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.49,1.50

Tim Peters tim_one@users.sourceforge.net
Wed, 12 Sep 2001 12:53:18 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv5435/python/Lib/test

Modified Files:
	test_descr.py 
Log Message:
Added subclass equality tests.  Almost all of these are commented out now,
because they don't work yet.


Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** test_descr.py	2001/09/12 19:12:48	1.49
--- test_descr.py	2001/09/12 19:53:15	1.50
***************
*** 1365,1368 ****
--- 1365,1369 ----
      verify(repr(hexint(1000) + 7) == "0x3ef")
      a = hexint(12345)
+     #XXX verify(a == 12345)
      verify(int(a) == 12345)
      verify(int(a).__class__ is int)
***************
*** 1389,1392 ****
--- 1390,1394 ----
      verify(str(5 + octlong(3000)) == "05675")
      a = octlong(12345)
+     #XXX verify(a == 12345L)
      verify(long(a) == 12345L)
      verify(hash(a) == hash(12345L))
***************
*** 1426,1429 ****
--- 1428,1432 ----
      verify(repr(precfloat(1.1)) == "1.1")
      a = precfloat(12345)
+     #XXX verify(a == 12345.0)
      verify(float(a) == 12345.0)
      verify(float(a).__class__ is float)
***************
*** 1438,1445 ****
--- 1441,1450 ----
      base = complex(-3, 4)
      verify(base.__class__ is complex)
+     #XXX 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(complex(a) == base)
      verify(complex(a).__class__ is complex)
***************
*** 1465,1468 ****
--- 1470,1474 ----
              return self._rev
      a = madtuple((1,2,3,4,5,6,7,8,9,0))
+     verify(a == (1,2,3,4,5,6,7,8,9,0))
      verify(a.rev() == madtuple((0,9,8,7,6,5,4,3,2,1)))
      verify(a.rev().rev() == madtuple((1,2,3,4,5,6,7,8,9,0)))
***************
*** 1499,1502 ****
--- 1505,1509 ----
              return self._rev
      s = madstring("abcdefghijklmnopqrstuvwxyz")
+     #XXX verify(s == "abcdefghijklmnopqrstuvwxyz")
      verify(s.rev() == madstring("zyxwvutsrqponmlkjihgfedcba"))
      verify(s.rev().rev() == madstring("abcdefghijklmnopqrstuvwxyz"))
***************
*** 1512,1515 ****
--- 1519,1523 ----
      base = "\x00" * 5
      s = madstring(base)
+     #XXX verify(s == base)
      verify(str(s) == base)
      verify(str(s).__class__ is str)
***************
*** 1555,1558 ****
--- 1563,1567 ----
  
      s = madstring("x y")
+     #XXX verify(s == "x y")
      verify(intern(s).__class__ is str)
      verify(intern(s) is intern("x y"))
***************
*** 1561,1564 ****
--- 1570,1574 ----
      i = intern("y x")
      s = madstring("y x")
+     #XXX verify(s == i)
      verify(intern(s).__class__ is str)
      verify(intern(s) is i)
***************
*** 1578,1581 ****
--- 1588,1592 ----
              return self._rev
      u = madunicode("ABCDEF")
+     verify(u == u"ABCDEF")
      verify(u.rev() == madunicode(u"FEDCBA"))
      verify(u.rev().rev() == madunicode(u"ABCDEF"))