[Python-checkins] CVS: python/dist/src/Lib/test test_compare.py,1.4,1.5 test_descr.py,1.11,1.12
Tim Peters
tim_one@users.sourceforge.net
Thu, 16 Aug 2001 09:56:18 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv14276/Lib/test
Modified Files:
test_compare.py test_descr.py
Log Message:
Repair some accidents causing Windows failures:
+ test_compare. While None compares less than anything else, it's not
always the case that None has the smallest id().
+ test_descr. The output of %p (pointer) formats varies across platforms.
In particular, on Windows it doesn't produce a leading "0x".
Index: test_compare.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_compare.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_compare.py 2001/08/15 21:02:20 1.4
--- test_compare.py 2001/08/16 16:56:16 1.5
***************
*** 46,50 ****
print "%s != %s" % (a, b)
# Ensure default comparison compares id() of args
! L = [None]
for i in range(10):
L.insert(len(L)/2, Empty())
--- 46,50 ----
print "%s != %s" % (a, b)
# Ensure default comparison compares id() of args
! L = []
for i in range(10):
L.insert(len(L)/2, Empty())
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** test_descr.py 2001/08/15 23:57:59 1.11
--- test_descr.py 2001/08/16 16:56:16 1.12
***************
*** 882,887 ****
verify(not c1 != c1)
verify(not c1 == c2)
! verify(str(c1) == '<C object at 0x%x>' % id(c1))
! verify(repr(c1) == '<C object at 0x%x>' % id(c1))
verify(-1 not in c1)
for i in range(10):
--- 882,887 ----
verify(not c1 != c1)
verify(not c1 == c2)
! verify(str(c1).startswith('<C object at '))
! verify(str(c1) == repr(c1))
verify(-1 not in c1)
for i in range(10):
***************
*** 903,908 ****
verify(not d1 != d1)
verify(not d1 == d2)
! verify(str(d1) == '<D object at 0x%x>' % id(d1))
! verify(repr(d1) == '<D object at 0x%x>' % id(d1))
verify(-1 not in d1)
for i in range(10):
--- 903,908 ----
verify(not d1 != d1)
verify(not d1 == d2)
! verify(str(d1).startswith('<D object at '))
! verify(str(d1) == repr(d1))
verify(-1 not in d1)
for i in range(10):