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

Guido van Rossum gvanrossum@users.sourceforge.net
Tue, 18 Sep 2001 18:16:18 -0700


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

Modified Files:
	test_descr.py 
Log Message:
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.)


Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** test_descr.py	2001/09/18 21:24:18	1.63
--- test_descr.py	2001/09/19 01:16:16	1.64
***************
*** 1493,1502 ****
      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)
--- 1493,1502 ----
      base = complex(-3, 4)
      verify(base.__class__ is complex)
!     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")
!     verify(a == base)
      verify(complex(a) == base)
      verify(complex(a).__class__ is complex)
***************
*** 1822,1826 ****
              return self.hashcode
  
!     verify('aBc' == cistr('ABC') == 'abc')
      verify(str(cistr('ABC')) == 'ABC')
  
--- 1822,1827 ----
              return self.hashcode
  
!     verify(cistr('ABC') == 'abc')
!     verify('aBc' == cistr('ABC'))
      verify(str(cistr('ABC')) == 'ABC')